Android:滚动时 jquery 移动文本框在固定标题上重叠
当用户点击任何文本框并开始滚动时,聚焦的文本框会与固定标题重叠(如上所示)。
https://www.dropbox.com/s/vk6nzeeqrx68uai/Screenshot_2013-10-01-10-19-39-2.png
有什么想法可以防止用户单击该文本框时突出显示该文本框。
图片:https://www.dropbox.com/s/43nee5bw4x9grzk/Screenshot_2013-10-01-13-37-11-1.png
我希望第二个文本框在点击后也与第一个文本框相同。
谢谢 拉兹
最佳答案
在可绘制对象中使用 Selector.xml
文件,然后使用两个不同的背景图像。一张是悬停图片,另一张是普通图片。
例如:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/hover_Bg" android:state_pressed="true"></item>
<item android:drawable="@drawable/hover_Bg" android:state_focused="true"></item>
<item android:drawable="@drawable/normal_Bg"></item>
</selector>
在你的布局中这样设置。
<EditText
android:id="@+id/firstname_edt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="@drawable/Selector"
android:inputType="textPersonName" >
</EditText>
关于javascript - HTML 5 : Text box getting highlighted,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19113016/