Android examples for User Interface:View
set View Overflow Style Always
//package com.java2s; import java.lang.reflect.Field; import android.content.Context; import android.util.Log; import android.view.ViewConfiguration; public class Main { public static void setOverflowStyleAlways(Context context) { ViewConfiguration config = ViewConfiguration.get(context); try {//from w ww . ja va 2 s .c o m Field menuKey = config.getClass().getDeclaredField( "sHasPermanentMenuKey"); menuKey.setAccessible(true); menuKey.setBoolean(config, false); } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } }