Right gravity and hint in EditText is making hint disappear

by and.pradeep » Mon, 02 Nov 2009 14:35:32 GMT


Sponsored Links
 Hi,
     I am trying to apply RIGHT gravity to EditText(google search bar)
with hint and setSingleLine property to true but hint is disappearing.
Have I missing something? below is the code



       EditText mEditText = new EditText(this);

       mEditText.setGravity(Gravity.RIGHT);
       mEditText.setHint(hint);
       mEditText.setSingleLine(true); //this is required but without
this hint appears

       //mEditText.setInputType
(InputType.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT);
       //the above line also makes the hint disappear


Regards
Pradeep

--



Other Threads

1. New countries, but not possible to move existing account?

We have registered a company in the UK to be able to sell on the
Android Market. Now that the market is opened in our own country
(Norway) it would be great to move the applications so that our income
would be in the Norwegian account. Or change our exisiting country to
Norway.

This is not possible right? Found some old posts on the issue and
didn't seem promising:
http://www.google.com/support/forum/p/checkout-merchants/thread?tid=6efbe25a772dd7a7&hl=en

-Christer

-- 

2. createSurface fails with out-of-memory exception

I'm creating a screen with about 120 TextViews in a grid pattern -
about 3 screens worth. The TextViews are arranged in TableRows inside
a TableLayout inside a ScrollView. I'm not using a GridView because it
doesn't scroll correctly for my application.

In the Allocation Tracker I can see that my onCreate takes about 46K
of memory, which seems modest. However, I'm getting an out-of-memory
exception from inside the Android framework in the createSurface
method.

I'm trying to figure out how to diagnose the memory usage of
createSurface to see which of my Views is chewing up all the memory.
Maybe it's a programming error on my part or maybe it's a bug in the
Android framework. I just can't tell.

The exception causes the application to be killed, which aborts the
Allocation Tracker so I can't really see what's going on inside
createSurface.

I'm thinking maybe I should override createSurface and surround the
call to the super with a catch block. Then I can stop it in the
de{*filter*} before the process is killed. Can anyone think of a more
clever approach? Has anyone else diagnosed createSurface memory
problems? Is there a reference document that describes how it works?

-- 

3. Using Allocation Tracker in DDMS

4. Programmatically switching GPS on/off (how do they do it??)

5. Changing the width of an ImageView

6. how do I force sendDownUpKeyEvents(MEkeyEventCode) to complete

7. USB Video on an OMAP based board