阅读更多

 

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:
     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.

Here is the thread at android-developers: http://groups.google.rs/group/an ... 22#1ee9a6a2f60fb86e

 

下载 (55.54 KB)
2010-1-5 18:46

更多相关文章

  1. android 动画总结
  2. Android学习笔记之mainfest文件中android属性
  3. 设置 Toolbar(ActionBar) 上的按钮颜色
  4. 在RelativeLayout布局中可以设置标签的android:layout_toLeftO..
  5. android configChanges
  6. parsing XML: unbound prefix
  7. android 之 布局属性--RelativeLayout
  8. Android(安卓)动态设置布局属性
  9. android动态给view设置可见、不可见属性

随机推荐

  1. Android裁剪图片总结
  2. 解决Glide4.0和圆角裁剪CenterCrop冲突
  3. android webview 使用js加载json文件失败
  4. Android下相机的调用
  5. android notification 的总结分析
  6. Android(安卓)Scroll 详解
  7. android 设置 button 不同状态的图片
  8. 2010.12.29(2)——— android GridView
  9. 解决问题:Could not find method android(
  10. 关于Android studio的build.gradle的内容