Sunday, January 17, 2010

Work around for an Android 2.0 bug - gravity=right make EditText hint disppears

At lease in Vista/Android2.0/Simulator, the hint text you set for an EditText will disppear unexpected if you set the gravity=right at the same time.

I searched on the web and found no solution for it. But some guys thought it's a bug of Android 1.5+.

I tried and found that if the following attribute set at the same time, the hint will come back.

But android:singleLine(false) doest not have the same effect.