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.

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 中让activity全屏幕显示
  2. Android(安卓)自定义键盘中禁用点击预览弹窗
  3. 隐藏Android下的虚拟按键
  4. android-EditText输入框被键盘遮挡问题解决方案
  5. Android(安卓)视图动画(View Animation) 使用详解
  6. 《Android/OPhone 开发完全讲义》样章和目录下载
  7. 《Android/OPhone 开发完全讲义》样章和目录下载
  8. 《Android/OPhone 开发完全讲义》样章和目录下载
  9. Android学习建议

随机推荐

  1. android 开机自动运行程序
  2. android Activity活动周期 Service生命周
  3. 理解 Android(安卓)上的安全性
  4. 美化你的listView
  5. [转]Android异步处理系列文章索引
  6. NDK简单实例
  7. android 定制个性按钮 控件
  8. Head First Android(安卓)Development-笔
  9. Android(安卓)SVG图片解析Demo
  10. Android实现在列表List中显示半透明小窗