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.

更多相关文章

  1. android开发--RelativeLayout用到的一些重要的属性
  2. [转] 软键盘android:windowSoftInputMode属性使用
  3. Android_布局属性大全
  4. android shape 常用到属性的设置
  5. android学习——android text 属性大全
  6. Android EditView属性详细介绍
  7. Android studio相对布局的常用属性
  8. android中Selector中的相关属性及配置写法

随机推荐

  1. Android秋招提前批:大厂三面对答如流,原来
  2. 导入android源码有错,R.java文件不能自动
  3. Android(安卓)混淆其实很简单
  4. 如何检测android上的多媒体文件属于音频
  5. 【转】wakelock使用注意事项
  6. WebView的介绍与简单实现Android和H5互调
  7. Android(安卓)调用系统相机,解决回调的res
  8. Android(安卓)studio 通过xml文件设置点
  9. android中的目录结构介绍
  10. android运行时ART加载OAT文件解析