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】Android EditText 去除边框

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

  2. Android EditText如何去除边框添加下划线

    (一)问题 之前的自定义EditText只能显示高度不超过屏幕高度的文本内容,继续增加内容会出现如下问题: (二)原因分析 下部(超出屏幕高度的部分)没有继续画线,也就是说横线没有画够,那么一定是循环 ...

  3. android ------ 高版本的 Tablayout 下划线宽度

    前面呢,有写过TabLayout的博客,最近开发用到了高本版遇到一些问题,来总结一下 Android--------TabLayout实现新闻客户端顶部导航栏 Android中Tablayout设置下 ...

  4. Android开发之TextView的下划线添加

    如何给TextView添加下划线呢,最近项目中需要这个,于是就用代码添加了下划线功能.主要就是用Paint的setFlags方法来实现,具体如下: ((TextView)mScrollView.fin ...

  5. android:为TextView加入样式——下划线,颜色,设置链接样式及前背景色

    实现下划线及颜色设置: public class AtActivity extends Activity { LinearLayout ll;     /** Called when the acti ...

  6. Android EditText 改变边框颜色

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

  7. delphi edit边框成为下划线

    设置它的几个属性:BevelEdges    |_ beLeft = False;    |_ beTop   = False;    |_ beRight = False;    |_ beBott ...

  8. 【我的Android进阶之旅】如何隐藏Android中EditText控件的默认下划线

    Android EditText控件是经常使用的控件,但是有时候我们并不需要它的一些默认的属性,比如说下划线,因为有时候这样的默认下划线看起来特别怪异,和其他控件在一起搭配的时候不协调,因此有时候就需 ...

  9. Android开发技巧——去掉TextView中autolink的下划线

    我们知道,在布局文件中设置textview的autolink及其类型,这时textivew上会显示link的颜色,并且文字下面会有一条下划线,表示可以点击.而在我们在点击textview时,应用将根据 ...

随机推荐

  1. 高级SQL语句

    改变数据 insert record 插入一行 insert into foods (name, type_id) values ('Cinnamon Bobka', 1); 如果在insert语句中 ...

  2. System.currentTimeMillis()与SystemClock.uptimeMillis()

    1.System.currentTimeMillis()获取的是系统的时间,可以使用SystemClock.setCurrentTimeMillis(long millis)进行设置.如果使用Syst ...

  3. ios线程和GCD

    1.什么是进程? 进程是指在系统中正在运行的一个应用程序.比如同时打开QQ.Xcode,系统就会分别启动2个进程.截图 2.什么是线程? 1).一个进程要想执行任务,必须得有线程(每一个进程至少要有一 ...

  4. ios必须知道的事情

    一. 学前提醒 其实iOS开发就是开发iPhone\iPad上的软件,而要想开发一款软件,首先要学习程序设计语言 iOS开发需要学习的主要程序设计语言有:C语言.C++.Objective-C,其中C ...

  5. Sql server profiler抓出的语句不可信

      Sql profiler抓出的语句不可信      

  6. PHP implode() 函数 把数组元素组合为字符串

    http://www.w3school.com.cn/php/func_string_implode.asp PHP implode() 函数 PHP String 函数 实例 把数组元素组合为字符串 ...

  7. Linux hostname对Oracle实例以及监听的影响

    在Linux平台中,对hostname的修改,是否对ORACLE数据库实例或监听进程有影响呢?如果有影响,又要如何解决问题呢?另外/etc/hosts下相关内容的修改,是否也会影响实例或监听呢?这里涉 ...

  8. Mysql查询阻塞初探

    第一次值班,报警打电话给我说,数据库复制延时一个多小时,那个时候是半夜啊,但我还是很清醒的起来,开机.vpn.登录.show processlist,结果发现情况是这样的: 红线框表示的是当前每个线程 ...

  9. java JedisUtils工具类

    package com.sh.xrsite.common.utils; import java.util.List; import java.util.Map; import java.util.Se ...

  10. arcgis 随手记

    1,ArcGISDynamicMapServiceLayer   3.0  用  4.1 以后用MapImageLayer 代码如下: <!DOCTYPE html> <html&g ...