如何在Android中设置EditText开始的时候是否获得焦点

时间:2014-09-05 00:54:00   收藏:0   阅读:282

在Android中有时候会遇到EditText是否设置获得焦点的属性:

其实实现起来很简单,在其父控件中添加属性:

    android:focusable="true"
           android:focusableInTouchMode="true"

就可以了。

 

有时候EditText需要设置它的样式像textview那样:

实现起来简单,在其添加属性:android:backgrpund ="@null",就可以了。

 

哈哈,实现的效果不错。

bubuko.com,布布扣
 
 
 
 

原文:http://www.cnblogs.com/leifengcomrade/p/3957092.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!