Android examples for User Interface:View
get Overflow Button Internal
//package com.java2s; import java.lang.reflect.Field; import android.view.View; public class Main { private static View getOverflowButtonInternal(Object menuPresenterView) { try {//from www. j a va 2s . c o m Field overflowField = menuPresenterView.getClass() .getDeclaredField("mOverflowButton"); overflowField.setAccessible(true); View overFlowButtonView = (View) overflowField .get(menuPresenterView); return overFlowButtonView; } catch (NoSuchFieldException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } }