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.

android edittext 去边框的更多相关文章

  1. android edittext 去边框 去下划线

    EditText的background属性设置为@null就搞定了:android:background="@null"style属性倒是可加可不加 附原文:@SlumberMac ...

  2. 【Android】Android EditText 去除边框

    [Android]Android EditText 去除边框 将EditText属性设置修改 android:background="@null" //////////////// ...

  3. Android EditText 改变边框颜色

    第一步:为了更好的比较,准备两个一模一样的EditText(当Activity启动时,焦点会在第一个EditText上,如果你不希望这样只需要写一个高度和宽带为0的EditText即可避免,这里就不这 ...

  4. Android EditText 不弹出输入法

    当第一次进入一个activity的时候  一般是第一个edittext是默认选中的,但是该死的软键盘也一起弹出来了 那是相当的不美观哈!(#‵′)凸.为此, 本大人就去寻找在刚进入这个activity ...

  5. Android EditText属性

    1.EditText输入的文字为密码形式的设置 (1)通过.xml里设置: 把该EditText设为:android:password="true" // 以”.”形式显示文本 ( ...

  6. Android EditText悬浮在输入法之上

    Android EditText悬浮在输入法之上 使用 android:windowSoftInputMode="adjustResize" 会让界面整体被顶上去,很多时候我们不需 ...

  7. duilib 的IE浏览器控件去边框和去滚动条的代码

    近些天在duilib群里经常有朋友问起,怎么让duilib的IE控件可以去边框,去滚动条的问题,或者是如何去控件IE控件的行为.为了避免重复的回答,我就写一篇博文,把处理方法说明一下. duilib中 ...

  8. android EditText获取光标位置并安插字符删除字符

    android EditText获取光标位置并插入字符删除字符1.获取光标位置int index = editText.getSelectionStart(); 2.在光标处插入字符int index ...

  9. Android EditText截获与监听输入事件

      Android EditText截获与监听输入事件共有2种方法: 1.第一种方法:使用setOnKeyListener(),不过这种方式只能监听硬键盘事件. edittext.setOnKeyLi ...

随机推荐

  1. scikit-learn——快速入门

    scikit-learn——快速入门 sklearn 快速入门 环境: ubuntu 12.04, 64 bits python 2.7 sklearn 0.14 好几个月没有发博客了,平时的笔记都随 ...

  2. JS BOM知识整理

    BOM部分主要是针对浏览器的内容,其中常用的就是window对象和location, window是全局对象很多关于浏览器的脚本设置都是通过它. location则是与地址栏内容相关,比如想要跳转到某 ...

  3. 每天一个linux命令(7):cp 命令

    cp 命令用来复制文件或者目录,是Linux系统中最常用的命令之一.一般情况下,shell会设置一个别名,在命令行下复制文件时,如果目标文件已经存在, 就会询问是否覆盖,不管你是否使用-i参数.但是如 ...

  4. 第十四章:Annotation(注释)

    一:注解 1.当成是一种修饰符吧,修饰类及类的所有成员. 代码里的特殊标记,这些标记可以在编译.类加载.运行时被读取. 2.@Override:强制子类覆盖(重写)父类的方法. @Deprecated ...

  5. Ibatis学习总结2--SQL Map XML 配置文件

    SQL Map 使用 XML 配置文件统一配置不同的属性,包括 DataSource 的详细配置信息, SQL Map 和其他可选属性,如线程管理等.以下是 SQL Map 配置文件的一个例子: Sq ...

  6. WPF学习(一)--布局控件简介

    WPF的4种基本布局介绍 1.Grid的布局 这个就没啥特别好说的,其实,基本上复杂的布局,都需要用到Grid. 主要就是对行和列进行进行设置和定义. 1.行表格 列表格: 包含行和列的表格 2.St ...

  7. HashMap 和 HashTable区别

    HashMap 非线程安全的 HashTable线程安全的 package Collections.Map; import java.util.HashMap; public class HashMa ...

  8. 【CodeForces 624C】Graph and String

    题 题意 n个表示abc三个字符的点,所有a和b是相连的,所有b和c是相连的,所有相同的是相连的,现在给你n个点和他们之间的m条边,判断是否存在这样的字符串,存在则给出一个符合条件的. 分析 我的做法 ...

  9. 【CodeForces 624D】Array GCD

    题 You are given array ai of length n. You may consecutively apply two operations to this array: remo ...

  10. 学习笔记 BIT(树状数组)

    痛定思痛,打算切割数据结构,于是乎直接一发BIT 树状数组能做的题目,线段树都可以解决 反之则不能,不过树状数组优势在于编码简单和速度更快 首先了解下树状数组: 树状数组是一种操作和修改时间复杂度都是 ...