Poor menu layout

by Edward Falk » Thu, 05 Mar 2009 05:25:10 GMT


Sponsored Links
 Hi all; I took a bare-bones "hello world" application and added these
four menu items in onCreateOptionsMenu():

+--------------------------------------------+
|                    Start                   |
+--------------------------------------------+
|                    Find                    |
+----------------------+---------------------+
|Enable Location Provid|        About        |
+----------------------+---------------------+

[you'll need a fixed-width font to view this properly]

As you can see, the menu was very poorly laid out.  Making my 3rd
label shorter fixed the problem, but this definitely looks like broken
behavior to me.  Is there anything I'm doing wrong here?  The relevant
code is:

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);
    menu.add(Menu.NONE, Menu.NONE, Menu.NONE,
R.string.menu_start_label);
    menu.add(Menu.NONE, Menu.NONE, Menu.NONE,
R.string.menu_find_label);
    menu.add(Menu.NONE, Menu.NONE, Menu.NONE,
R.string.enable_location);
    menu.add(Menu.NONE, Menu.NONE, Menu.NONE,
R.string.menu_about_label);
    return true;
  }


full source available at  http://www.efalk.org/tester3.tar.gz 

ADVthanksANCE,

  -ed falk
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. SIPDemo is not working...

I tried to use SIPDemo application on Android 2.3 - revision 9
emulator

But it returns null for the SIPManager.newInstance(this).

if

(manager == null) {
     manager = SipManager.newInstance(this);
}

On checking SIPManager.isAPISupported. It retruns false. Has any body
run SIPDemo application, any help is appreciated. I have already
specifed follwoing feature permissions in

the Manifest file:

<

uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_SIP" />
<uses-feature android:name="android.software.sip" />
<uses-feature android:name="android.software.sip.voip" />


Kindly please guide me how to fix this problem and run the SipDemo
application successfully.

-- 

2. Having issues with one type of phone.

I have an app on the market. Everyone I have had try it (half dozen
folks or so) likes the thing and it works well, but one type of
Android based phone seems to have major issues with it.

In specific, Droids!  The app plays Ogg Vorbis (ogg) sound files and
displays a white screen at varying intensities (it's a night light
app).

Does anyone have a clue as to why Droids act differently than all
others (I've hit a wide variety of other phones and they all work
fine)?

Also as a side note, wouldn't it be GREAT if Google would have a bank
of phones one could install their application on for testing? We could
pay a nominal fee, sign up, do our testing, and then let the next one
hit the phone farm.

I really hate having bugs that customers have to discover that I don't
have a good way to solve like this.

-- 

3. How to set a dynamic View size

4. Query related to CTS Android

5. 2.3 ACD - Thermometer not allowed

6. <WTB> samsung galaxy tab hardcase

7. [WTS] Speed Flexi 1x di EVO