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. Polite discussion of lite/trial vs pro distribution

First I will explain my situation.  Then, I would greatly appreciate
constructive dialog on how other developers feel similar situations
should be managed.

I wrote a simple app in November.  I offered it for free on the Market
for two reasons.  One, Google hadn't implemented paid apps yet, so I
had no choice.  Two, by my own admission, v1.0 was too simple too
garner payment.

However, in the app's documentation, I requested donations toward
future development.  Out of thousands of installs, I received nothing.

This week I finished a considerably fancier version of the program.
Given hundreds of hours of unpaid development, I decided to charge a
few bucks for the new version.  I split the app into lite and pro
versions.  The lite version has all the new fancy features enabled but
is limited in how large a document can be created (spread sheet, I
limited the number of rows/cols, admittedly unlimited in the earlier
version).  The pro version went to Market as a new app, the lite
version on top of the old app to retain the long feedback history.

Since the Market provides no way to downgrade, I put the old unlimited
version on my website and put directions in the new lite version in
multiple places explaining how to revert to the old version.  Thus,
any user dissatisfied with the rol/col limit could restore the EXACT
functionality they had before upgrading to the lite version.

Incidentally, the 325 character blurb allotted on the Market was
insufficient to list the new features and the lite version's
limitation and the caveat that the lite version could be reverted
through my website.  I simply could not communicate these facts to
users to help them decide whether to upgrade or what to expect after
upgrading.

The complaints about the new lite version have been diverse.  Most
pertinent to this discussion are complaints that the lite version now
limits the rows/cols where the previous version didn't.  I find such
complaints unjustifiable since I explicitly permit reversion.  I
literally don't see what they have to complain about.  Another irksome
genre of complaints is that the program is still too simple to ask any
money for at all.  I am infuriated.  It costs less than an ice cream
cone.

So, as discussion, how would other developers handle this situation:
initial app is simple so offered for free, later version is complex so
split into lite/pro.  You don't want to limit the lite version by not
showing the new fancy features, so the limitation must be something
else, a time limit, a forced delay splash screen, something.  I chose
limited rows/cols on a spreadsheet app, but also permitted reversion
to the old unlimited version.

How would other developers implement an increase in complexity, charge
for it, yet provide a lite version that doesn't anger users of a
previously unlimited, but also much more simplistic app?

Instead of flaming me where you think I made mistakes, please just
open the floor for honest discussion.  I'm trying to figure out how to
do this properly.  A lot of us are probably trying to figure out the
same thing.

Thanks.

--~--~---------~--~----~------------~-------~--~----~

2. Query - Android UI/worker threads

Hi All

This query is regarding android  UI & Worker threads.

I am writing an application in which I have

1.An Activity with a button in it. On clicking this button, i need to
start a new thread which would do some graphics rendering by calling
native C calls.(these are loaded in the form of a shared object.)
This rendering screen inturn has some menus like pause/stop etc.

2.Now on seleting any of these menus, i want to call the respective
native C functions.(All that needs to call the native C fucntions
should be done in a child thread.)

For example, when the rendering is going on(Worker thread), if the
user clicks on pause button on that screen, the Main thread should
pick this event and send a msg to Worker thread saying a pause event
has come and based on this msg, child thread will cal its own native C
pause function to pause the animation.( I donot want to do any
animation related stuffs in my main thread for better performance & I
have all native pause/run/stop/et all been implemented too.)

3. In total,i need to handle all native C related acivities in a child
thread and all the notification related to UI in a main thread.


Is there any good way of doing this? The APIs in Handler make child to
post a message to the main thread after its execution. But what i want
is, any UI event shud be notified to Main first which would then tell
child to act accordingly.


This looks like a typical scenario in almost all mobile games. Hope
there is a good solution!! Please do suggest. Any ideas in this regard
are highly appreciable

Thanks
Latha


--~--~---------~--~----~------------~-------~--~----~

3. i want to connect the emulator with the tomcat server using http protocol

4. how to port android to a new device?

5. Androiv VPN?

6. HTC Magic - Crippled Features on Retail Devices

7. Output Android Mobile to Monitor