Java Code Examples for android.view.Window#performPanelIdentifierAction()
The following examples show how to use
android.view.Window#performPanelIdentifierAction() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Instrumentation.java From AndroidComponentPlugin with Apache License 2.0 | 5 votes |
/** * Execute a particular menu item. * * @param targetActivity The activity in question. * @param id The identifier associated with the menu item. * @param flag Additional flags, if any. * @return Whether the invocation was successful (for example, it could be * false if item is disabled). */ public boolean invokeMenuActionSync(Activity targetActivity, int id, int flag) { class MenuRunnable implements Runnable { private final Activity activity; private final int identifier; private final int flags; boolean returnValue; public MenuRunnable(Activity _activity, int _identifier, int _flags) { activity = _activity; identifier = _identifier; flags = _flags; } public void run() { Window win = activity.getWindow(); returnValue = win.performPanelIdentifierAction( Window.FEATURE_OPTIONS_PANEL, identifier, flags); } } MenuRunnable mr = new MenuRunnable(targetActivity, id, flag); runOnMainSync(mr); return mr.returnValue; }
Example 2
Source File: Instrumentation.java From AndroidComponentPlugin with Apache License 2.0 | 5 votes |
/** * Execute a particular menu item. * * @param targetActivity The activity in question. * @param id The identifier associated with the menu item. * @param flag Additional flags, if any. * @return Whether the invocation was successful (for example, it could be * false if item is disabled). */ public boolean invokeMenuActionSync(Activity targetActivity, int id, int flag) { class MenuRunnable implements Runnable { private final Activity activity; private final int identifier; private final int flags; boolean returnValue; public MenuRunnable(Activity _activity, int _identifier, int _flags) { activity = _activity; identifier = _identifier; flags = _flags; } public void run() { Window win = activity.getWindow(); returnValue = win.performPanelIdentifierAction( Window.FEATURE_OPTIONS_PANEL, identifier, flags); } } MenuRunnable mr = new MenuRunnable(targetActivity, id, flag); runOnMainSync(mr); return mr.returnValue; }
Example 3
Source File: Instrumentation.java From AndroidComponentPlugin with Apache License 2.0 | 5 votes |
/** * Execute a particular menu item. * * @param targetActivity The activity in question. * @param id The identifier associated with the menu item. * @param flag Additional flags, if any. * @return Whether the invocation was successful (for example, it could be * false if item is disabled). */ public boolean invokeMenuActionSync(Activity targetActivity, int id, int flag) { class MenuRunnable implements Runnable { private final Activity activity; private final int identifier; private final int flags; boolean returnValue; public MenuRunnable(Activity _activity, int _identifier, int _flags) { activity = _activity; identifier = _identifier; flags = _flags; } public void run() { Window win = activity.getWindow(); returnValue = win.performPanelIdentifierAction( Window.FEATURE_OPTIONS_PANEL, identifier, flags); } } MenuRunnable mr = new MenuRunnable(targetActivity, id, flag); runOnMainSync(mr); return mr.returnValue; }
Example 4
Source File: Instrumentation.java From AndroidComponentPlugin with Apache License 2.0 | 5 votes |
/** * Execute a particular menu item. * * @param targetActivity The activity in question. * @param id The identifier associated with the menu item. * @param flag Additional flags, if any. * @return Whether the invocation was successful (for example, it could be * false if item is disabled). */ public boolean invokeMenuActionSync(Activity targetActivity, int id, int flag) { class MenuRunnable implements Runnable { private final Activity activity; private final int identifier; private final int flags; boolean returnValue; public MenuRunnable(Activity _activity, int _identifier, int _flags) { activity = _activity; identifier = _identifier; flags = _flags; } public void run() { Window win = activity.getWindow(); returnValue = win.performPanelIdentifierAction( Window.FEATURE_OPTIONS_PANEL, identifier, flags); } } MenuRunnable mr = new MenuRunnable(targetActivity, id, flag); runOnMainSync(mr); return mr.returnValue; }
Example 5
Source File: Instrumentation.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
/** * Execute a particular menu item. * * @param targetActivity The activity in question. * @param id The identifier associated with the menu item. * @param flag Additional flags, if any. * @return Whether the invocation was successful (for example, it could be * false if item is disabled). */ public boolean invokeMenuActionSync(Activity targetActivity, int id, int flag) { class MenuRunnable implements Runnable { private final Activity activity; private final int identifier; private final int flags; boolean returnValue; public MenuRunnable(Activity _activity, int _identifier, int _flags) { activity = _activity; identifier = _identifier; flags = _flags; } public void run() { Window win = activity.getWindow(); returnValue = win.performPanelIdentifierAction( Window.FEATURE_OPTIONS_PANEL, identifier, flags); } } MenuRunnable mr = new MenuRunnable(targetActivity, id, flag); runOnMainSync(mr); return mr.returnValue; }
Example 6
Source File: Instrumentation.java From droidel with Apache License 2.0 | 5 votes |
/** * Execute a particular menu item. * * @param targetActivity The activity in question. * @param id The identifier associated with the menu item. * @param flag Additional flags, if any. * @return Whether the invocation was successful (for example, it could be * false if item is disabled). */ public boolean invokeMenuActionSync(Activity targetActivity, int id, int flag) { class MenuRunnable implements Runnable { private final Activity activity; private final int identifier; private final int flags; boolean returnValue; public MenuRunnable(Activity _activity, int _identifier, int _flags) { activity = _activity; identifier = _identifier; flags = _flags; } public void run() { Window win = activity.getWindow(); returnValue = win.performPanelIdentifierAction( Window.FEATURE_OPTIONS_PANEL, identifier, flags); } } MenuRunnable mr = new MenuRunnable(targetActivity, id, flag); runOnMainSync(mr); return mr.returnValue; }