Because of the actionbar between the different devices for the left side of the hidden part, 4.2 will have an ellipsis, and the previous version needs to click on the virtual key menu can be called out, this method is to cast the 4.2 version below the right ellipsis
/** Device Configuration Changes */
@Override
public void onconfigurationchanged (Configuration newconfig) {
Super.onconfigurationchanged (Newconfig);
Mactionbardrawertoggle.onconfigurationchanged (Newconfig);
}
private void Getoverflowmenu () {
Viewconfiguration Viewconfig = Viewconfiguration.get (this);
try {
Field Overflowmenufield = Viewconfiguration.class
. Getdeclaredfield ("Shaspermanentmenukey");
if (null! = Overflowmenufield) {
Overflowmenufield.setaccessible (TRUE);
Overflowmenufield.set (Viewconfig, false);
}
} catch (Nosuchfieldexception e) {
TODO auto-generated Catch block
E.printstacktrace ();
} catch (Illegalaccessexception e) {
TODO auto-generated Catch block
E.printstacktrace ();
} catch (IllegalArgumentException e) {
TODO auto-generated Catch block
E.printstacktrace ();
}
}
Different Android versions about Actionbar to the right of the ellipsis menu cast