How to associate visibility of Settings menu item with visibility of Developer menu in AOSP? - menuitem

I need to associate visibility of menu Item (for example print item) with visibility of Developer menu in android. How to properly do it? I just started to work with AOSP on Nexus 7.

The developer menu item is enabled based on the below code , you could check the same conditions to enable other menu items :
http://androidxref.com/8.0.0_r4/xref/packages/apps/Settings/src/com/android/settings/deviceinfo/BuildNumberPreferenceController.java#115

Related

How to restore TOAD layout to its orginal layout?

How to reset layout to orginal layout. I should get the same layout when first time I installed toad.
#Edit-1: - I dont see SQL editor in the red highlighted area. How we can bring that up ?
Option 1 - Reset docking layout and toolbars - Retain all option settings, saved connections, SQL Recall, etc.
Rt-click on Toad's toolbar and show the "Desktops" bar.
Restore your default desktop.
Reset your toolbar layout via rt-click menu over Toad's toolbar.
Option 2 - Complete restoration of all configurations
If you'd like to do a complete restoration to a fresh installed state you can choose the "Copy User Settings..." menu item from the "Utilities" menu.
In there choose the option to reset to a clean state and click OK.
Note that this option will return all configuration settings to a fresh state including removing all saved connections and anything else you have done in Toad. The availability of "Copy User Settings..." is dependent on your version of Toad which I cannot tell from your screenshot alone, but it looks like you're on something in the 11.6-12.7 range so you should have it.

Sitecore Speak UI what layout and renderings for dialog opened from launchpad, desktop or content editor

What layout and renderings should be used to create a dialog/app which can be started from
Launchpad
Content Editor button
Desktop start menu shortcut
As an example; here are images of the User Manager dialog. Note the differences in the appearance of the header bar in each case. I tried to examine this control in Sitecore to see how it was developed, but it is implemented in Sheer UI, not SPEAK UI. Can this be done automatically with a particular layout and combination of renderings, or would I need to detect the context of the application to control whether the launchpad icon is displayed in the top left corner of the dialog?
User Manager - launched from Launchpad
User Manager - launched from Content Editor
User Manager - launched from Desktop Start Menu
I can tell you that the user manager example here is actually Sheer UI rather than SPEAK.
For the dialog header use the "DialogPageStucture", "DashboardPageStrucuture" will give you the "GlobalHeader" placeholder as used below. I'm not sure how you mix and match them as the User Manager is Sheer UI rather than SPEAK.
For the launch pad button and header use "GlobalHeader" and "GlobalLogo" (this is the launch pad button). Add GlobalHeader into the GlobalHeader placeholder. Add GlobalLogo into GlobalHeader.StartButton.

Not able to select option from dropdown box in an android mobile application

I have to automate payment gateway process for my native android application for which i have to select option from dropdowon box. After selecting an option "continue" button will be enabled.
On clicking continue button it takes me to new screen where payment details will be entered.
I'm facing following issues:
1) Not able to select drop down menu option after scrolling in the drop drown.
2) Able to select the option from first 5 options which are visible when dropdwon opens without any scrolling.after the option selection continue button has to be enabled by defalut.i am able to see that option got selected but not able to click on continue button.Script is not returning any error but i am sure it is not clicking on continue button.
Before clicking on dropdown id and class of dropdown are packagename;id/statechooser and android.widget.spinner respectively.
After click on dropdown id and class are android:id/text1 and android.widget.Textview.
Below is my code.
#entering Name
self.driver.find_element_by_id('packagename:id/name').send_keys('App Test');
self.driver.keyevent(66)
#entering address line 1
self.driver.find_element_by_id('packagename:id/address_line_1').send_keys('Madison Boulevard')
self.driver.keyevent(66)
self.driver.find_element_by_id('packagename;id/city').send_keys('Madison');
self.driver.find_element_by_id('packagename;id/zip').send_keys('25758');
self.driver.keyevent(66)(#this event for moving to dropdown)
self.driver.keyevent(66)(#this event for opening dropdown)
self.driver.find_element_by_xpath("//android.widget.TextView[#text='Alabama']").click()
self.driver.find_element_by_id('packagename:id/continue_button').click();
Finally I got solution for this. By using python wrapper for UIAUTOMATOR I am able to proceed to next page.I am using down method until the option is visible and then pressing enter to accept it instead of click method. Below is the code.
while(self.d(resourceId="android:id/text1").text!='Hawaii'):
self.d.press('down');
self.d.press('enter')

Add a new menu item in the Taskbar menu of all open applications in Windows 7

I want to know whether it's possible to add a menu item to the taskbar right-click menu of all open applications in Windows 7. I specifically want to know whether it's possible to add the new item directly above the "Close Window" (or "Close All Windows") menu item.
Any help is much appreciated.
Thanks.
No. Imagine if that were possible: Everybody would abuse it by adding their app to the menu of every other app.

How to show available windows in the Window menu

I have a MFC MDI application that I've recently ported from VS2003 to VS2008, and at the same time moved from Stingray Objective Studio 2006 v2 to v10.1. On the previous versions of my application, if I had more than one view open, the Window menu would be populated by an enumerated list of available views, e.g. 1 MyViewA, 2 MyViewB etc... If I had a large number of views, I would also get a Windows... menu option to allow me to select a view. This no longer happens, which is breaking some of my GUI level regression tests. My guess is that this functionality was implemented by either CMDIFrameWnd or SECMDIFrameWnd but I couldn't find a reference to it in the documentation. Does anyone know how I can get this functionality back.
First thing I'd do is create a new MDI application with the ClassWizard and check if the functionality you're missing is present. If so, poke around and see if you can tell what's different. One place to look may be the menu resource for the main menu.
If there is no in-built functionality to provide what you need, you can dynamically build the menu with the following pseudocode:
foreach registered CDocumentTemplate
foreach document
foreach view
{
if (numberOfWindowMenuItems < 5)
{
Add menu item
}
else
{
Add "Windows..." menu item
break all loops;
}