0

I have a edittext field in my android. When I am editing cursor showing only one letter. But when I press back key its showing all letters. What to do to show letters while typing. my layout would be like this:

<EditText
android:id="@+id/conPW"
android:layout_width="248px"
android:layout_height="43px"
android:textSize="18sp"
android:password="true"
android:layout_x="20px"
android:layout_y="152px"
>
</EditText>

thanks in advance

Vladimir Ivanov
  • 42,730
  • 18
  • 77
  • 103
Shekhar
  • 201
  • 1
  • 2
  • 5

2 Answers2

0

Ehh...you're setting android:password="true" - this is the field that gives you only one letter shown at the time.

Just remove that if you don't want it to function in this fashion?

Also, I would really not be using pixels as your layouts width & height, but that's for you to decide. It's not good practice in terms of different screen resolutions and whatnot. Use wrap_content / fill_parent and dp or sp.

http://developer.android.com/guide/practices/screens_support.html

What is the difference between "px", "dp", "dip" and "sp" on Android?

Community
  • 1
  • 1
Codemonkey
  • 3,412
  • 3
  • 20
  • 24
  • hey I have wrote same layout for another password field its working fine. But I donno what happened to this...? – Shekhar Mar 11 '11 at 09:49
  • @Shekhar You're not being clear in what your problem is......Sigh. Did you even **TRY** to do what I said? – Codemonkey Mar 11 '11 at 10:15
0

It is not the coding issue. It is a Android emulator issue. Have you tested it on device?

Sandy
  • 6,285
  • 15
  • 65
  • 93