Back to project page SSPIA.
The source code is released under:
MIT License
If you think the Android project SSPIA listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.fiec.sspia.util; // www . j a va 2s . co m import java.lang.reflect.Field; import com.fiec.sspia.buff.Tag; import android.app.Activity; import android.util.Log; import android.view.ViewConfiguration; public class MenuSettings{ private final static String _KEY = "sHasPermanentMenuKey"; private ViewConfiguration _CONFIG; private Field _MENUKEY; public MenuSettings(Activity context) { this._CONFIG = ViewConfiguration.get(context); } public boolean show(){ try{ this._MENUKEY = ViewConfiguration.class.getDeclaredField(_KEY); if(this._MENUKEY != null){ this._MENUKEY.setAccessible(true); this._MENUKEY.setBoolean(this._CONFIG, false); } return true; } catch(Exception ex){Log.e(Tag._TAG, "Error:_ "+ex.toString()); return false;} } }