简体   繁体   中英

Hint in Android

I tried to show a hint in the EditText of my form, but i can't see that hint that i have set in the XML Layout while my application gets deployed, but i can able see the hint in eclipse designer view, but while getting deployed the same hint suppose to appear is missing, i tried with all the possible ways still i could not get the hint in the EditText... This is one of the Edit Text layout that i have used..

<EditText android:id="@+id/SetTimerSec_EditText01"
    android:layout_width="60sp" 
    android:layout_height="40sp"
    android:singleLine="true" 
    android:layout_x="220sp" 
    android:layout_y="170sp"
    android:hint="0"
    android:inputType="phone"
    android:textColorHint="@color/black"
    android:gravity="center"
    android:focusableInTouchMode="true" />

[link text][1]

Can anybody Help me..Please

Thanks in advance

[1]: http://imgur.com/PzomF.jpg [ScreenShot of Designer View with hint displayed][1]

It seems like a SDK bug, or at least related to one.
http://code.google.com/p/android/issues/detail?id=7252

The hint shows up if you remove the following:
android:gravity="center"

添加android:ellipsize="start" ,您的提示就会显示并居中!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM