Android 中的提示
我尝试在表单的 EditText 中显示提示,但在部署应用程序时看不到我在 XML 布局中设置的提示,但我可以在 Eclipse 设计器视图中看到提示,但在获取时部署了假定出现的相同提示丢失,我尝试了所有可能的方法,但仍然无法在 EditText 中获得提示...这是我使用过的编辑文本布局之一..
<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" />
[链接文本][1 ]
任何人都可以帮助我..请
提前致谢
[1]: http://imgur.com/PzomF.jpg [显示提示的设计器视图的屏幕截图][1]
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]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这似乎是一个 SDK 错误,或者至少与之相关。
http://code.google.com/p/android/issues/详细信息?id=7252
如果删除以下内容,则会显示提示:
机器人:重力=“中心”
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"
然后你的提示就会出现并居中!add
android:ellipsize="start"
and your hint will show up and be centered!