Android: Disable EditText in 3 different ways with features comparison

Android: Disable EditText in 3 different ways with features comparison

I have to disable EditText and able to enable EditText again in my app for some reason. So I tried some functions that related to this. There are three different ways I known to disable EditText:

 

1. setEnabled()

 

2. setInputType()

 

3. setFocusable() + setFocusableInTouchMode()

 

QQ群:8657964(点我加入) | 留言 | Facebook
如果您觉得本站的存在对您多少有所帮助,可以用手机扫一扫以下二维码支付任意金额作为支持:支付宝 | 微信钱包
猫本屋(CATMEE)」文章全部原创、谢绝转载,作者「BianLei」,如果喜欢欢迎分享链接,相关内容参见本站原创声明
Tagged . Bookmark the permalink.

Android How to get each day of month and display it within EditText by a Button event
Android How to get each day of month and display it within EditText by a Button event

Android: Notification sticky notes source code example | Stick ListView item to notification with SQLiteDatabase manipulation
Android: Notification sticky notes source code example | Stick ListView item to notification with SQLiteDatabase manipulation

Android: Handling onItemClick event in ListView | How to get selected item in ListView
Android: Handling onItemClick event in ListView | How to get selected item in ListView

我在2006年之前的素描绘画(军舰,墙上画等)
我在2006年之前的素描绘画(军舰,墙上画等)

China Street Style 19 | Harbin Street Style
China Street Style 19 | Harbin Street Style

Comment Anonymously? No Problem! | 可以匿名评论了我会说?

Fill up Email address to subscribe reply and display your avatar from Gravatar (If any)
填写邮箱即可显示您在Gravatar的头像