2013-10-01 50 views
1

机器人:上固定报头的jquery移动文本框重叠,同时滚动HTML 5:文本框越来越突出

虽然任何文本框用户点击开始滚动,聚焦文本框重叠(以上示出)固定报头。

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

我想第二个文本框也将同第一个点击后。

感谢 雷斯

+0

,你使用的是什么?是混合应用程序或原生Android应用程序? – anand4tech

+0

是的,它是一个混合应用程序 – user2761566

+0

使用user-scalable = no“在meta标记中的html – anand4tech

回答

1

使用Selector.xml文件inyour绘制,然后使用两个不同的背景图片。一个是悬停图像另一个是正常图像。

例:

<?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> 
1

对于混合应用(HTML5,JS)使用用户可升级=否”元标记。

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> 
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 
+0
+0

我可以这样写吗? – user2761566

+0

不,你需要以html页面 – anand4tech