EditText去掉边框
来源:互联网 发布:php获取字符串长度函数 编辑:程序博客网 时间:2024/05/22 04:48
EditText的background属性设置为@null就搞定了:android:background="@null"
style属性倒是可加可不加
附原文:
@SlumberMachine, that's a great observation! But, it seems that there is more to making a TextView editable than just setting android:editable="true". It has to do with the "input method" - what ever that is - and that is where the real difference between TextView and EditText lies. TextView was designed with an EditText in mind, that's for sure. One would have to look at the EditText source code and probably EditText style to see what's really going on there. Documentation is simply not enough.
I have asked the same question back at android-developers group, and got a satisfactory answer. This is what you have to do:
XML:
<EditText android:id="@+id/title" android:layout_width="fill_parent"
style="?android:attr/textViewStyle"
android:background="@null" android:textColor="@null"/>
Instead of style="?android:attr/textViewStyle" you can also write style="@android :style/Widget.TextView", don't ask me why and what it means.
style属性倒是可加可不加
附原文:
@SlumberMachine, that's a great observation! But, it seems that there is more to making a TextView editable than just setting android:editable="true". It has to do with the "input method" - what ever that is - and that is where the real difference between TextView and EditText lies. TextView was designed with an EditText in mind, that's for sure. One would have to look at the EditText source code and probably EditText style to see what's really going on there. Documentation is simply not enough.
I have asked the same question back at android-developers group, and got a satisfactory answer. This is what you have to do:
XML:
<EditText android:id="@+id/title" android:layout_width="fill_parent"
style="?android:attr/textViewStyle"
android:background="@null" android:textColor="@null"/>
Instead of style="?android:attr/textViewStyle" you can also write style="@android :style/Widget.TextView", don't ask me why and what it means.
0 0
- EditText去掉边框
- EditText去掉边框和隐藏光标
- 去掉EditText的边框和下滑线
- EditText 去掉下划线 仿微信边框 selector
- EditText去掉黄色边框 && 如何限制edittext输入字数
- EditText 边框
- android editText 自定义边框
- EditText之边框颜色
- android 自定义edittext边框
- EditText去边框
- Edittext自定义边框颜色
- 改变edittext边框颜色
- 自定义edittext边框
- Android EditText 去边框
- EditText 去边框
- 改变edittext边框颜色
- 改变EditText边框颜色
- android edittext 去边框
- git常用命令
- 配置heat AutoScalingMultiAZSample.template 模板
- SQL2008避免出错(聚合函数+Over用法)
- java处理日期时间 相加减
- poll函数
- EditText去掉边框
- 函数索引的妙用
- Test__IO流综合应用的小练习
- RK2926 平板跟PC机连接起来的时候,修改驱动,盘符相关显示
- LinuxサーバへTomcat 7.xを導入し、自動起動するように設定する。
- 零缺陷编程读书笔记(六)自己设计并使用断言(4)
- C++面向对象类的实例题目六
- EasyMock 单元测试
- 又发现一个抄我课程大纲的网站