Add app drawer close action for events

This commit is contained in:
f43nd1r 2019-11-16 06:04:39 +01:00
parent 87d16ab200
commit 35d6774706
5 changed files with 10 additions and 1 deletions

View file

@ -7313,6 +7313,10 @@ public class Dashboard extends ResourceWrapperActivity implements OnLongClickLis
mHierarchyScreen.show(null);
break;
case GlobalConfig.CLOSE_APP_DRAWER:
finish();
break;
default:
return super.runAction(engine, source, ea, il, itemView);
}

View file

@ -33,7 +33,8 @@ public final class ActionsDescription {
new Action(GlobalConfig.ZOOM_TO_ORIGIN, R.string.an_z100, Action.CAT_NAVIGATION, Action.FLAG_TYPE_DESKTOP | Action.FLAG_TYPE_APP_DRAWER, Build.VERSION_CODES.FROYO),
new Action(GlobalConfig.ZOOM_FULL_SCALE, R.string.an_zfs, Action.CAT_NAVIGATION, Action.FLAG_TYPE_DESKTOP | Action.FLAG_TYPE_APP_DRAWER, Build.VERSION_CODES.FROYO),
new Action(GlobalConfig.SWITCH_FULL_SCALE_OR_ORIGIN, R.string.an_zt, Action.CAT_NAVIGATION, Action.FLAG_TYPE_DESKTOP | Action.FLAG_TYPE_APP_DRAWER, Build.VERSION_CODES.FROYO),
new Action(GlobalConfig.BACK, R.string.an_b, Action.CAT_NAVIGATION, Action.FLAG_TYPE_DESKTOP, Build.VERSION_CODES.FROYO),
new Action(GlobalConfig.BACK, R.string.an_b, Action.CAT_NAVIGATION, Action.FLAG_TYPE_DESKTOP |Action.FLAG_TYPE_APP_DRAWER, Build.VERSION_CODES.FROYO),
new Action(GlobalConfig.CLOSE_APP_DRAWER, R.string.close_app_drawer, Action.CAT_NAVIGATION, Action.FLAG_TYPE_APP_DRAWER, Build.VERSION_CODES.FROYO),
new Action(GlobalConfig.CATEGORY, R.string.acd_m, Action.CAT_MENU_STATUS_BAR, Action.FLAG_TYPE_DESKTOP |Action.FLAG_TYPE_APP_DRAWER, Build.VERSION_CODES.FROYO),

View file

@ -82,6 +82,7 @@ public class GlobalConfig extends JsonLoader {
public static final int HIDE_FLOATING_DESKTOP=43;
public static final int OPEN_HIERARCHY_SCREEN=44;
public static final int SHOW_APP_SHORTCUTS=45;
public static final int CLOSE_APP_DRAWER=46;
// update script EventHandler accordingly
public int version=1;

View file

@ -68,6 +68,7 @@ public class EventHandler {
public static final int HIDE_FLOATING_DESKTOP=43;
public static final int OPEN_HIERARCHY_SCREEN=44;
public static final int SHOW_APP_SHORTCUTS=45;
public static final int CLOSE_APP_DRAWER=46;
private EventAction mEventAction;

View file

@ -1322,4 +1322,6 @@
<string name="srch_regexp">Regexp</string>
<string name="srch_case">Match case</string>
<string name="sc_ind">Autoindentation</string>
<string name="close_app_drawer">Close app drawer</string>
</resources>