android edittext 去边框 去下划线
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 去边框 去下划线的更多相关文章
- 【Android】Android EditText 去除边框
[Android]Android EditText 去除边框 将EditText属性设置修改 android:background="@null" //////////////// ...
- Android EditText如何去除边框添加下划线
(一)问题 之前的自定义EditText只能显示高度不超过屏幕高度的文本内容,继续增加内容会出现如下问题: (二)原因分析 下部(超出屏幕高度的部分)没有继续画线,也就是说横线没有画够,那么一定是循环 ...
- android ------ 高版本的 Tablayout 下划线宽度
前面呢,有写过TabLayout的博客,最近开发用到了高本版遇到一些问题,来总结一下 Android--------TabLayout实现新闻客户端顶部导航栏 Android中Tablayout设置下 ...
- Android开发之TextView的下划线添加
如何给TextView添加下划线呢,最近项目中需要这个,于是就用代码添加了下划线功能.主要就是用Paint的setFlags方法来实现,具体如下: ((TextView)mScrollView.fin ...
- android:为TextView加入样式——下划线,颜色,设置链接样式及前背景色
实现下划线及颜色设置: public class AtActivity extends Activity { LinearLayout ll; /** Called when the acti ...
- Android EditText 改变边框颜色
第一步:为了更好的比较,准备两个一模一样的EditText(当Activity启动时,焦点会在第一个EditText上,如果你不希望这样只需要写一个高度和宽带为0的EditText即可避免,这里就不这 ...
- delphi edit边框成为下划线
设置它的几个属性:BevelEdges |_ beLeft = False; |_ beTop = False; |_ beRight = False; |_ beBott ...
- 【我的Android进阶之旅】如何隐藏Android中EditText控件的默认下划线
Android EditText控件是经常使用的控件,但是有时候我们并不需要它的一些默认的属性,比如说下划线,因为有时候这样的默认下划线看起来特别怪异,和其他控件在一起搭配的时候不协调,因此有时候就需 ...
- Android开发技巧——去掉TextView中autolink的下划线
我们知道,在布局文件中设置textview的autolink及其类型,这时textivew上会显示link的颜色,并且文字下面会有一条下划线,表示可以点击.而在我们在点击textview时,应用将根据 ...
随机推荐
- Java虚拟机JVM学习04 类的初始化
Java虚拟机JVM学习04 类的初始化 类的初始化 在初始化阶段,Java虚拟机执行类的初始化语句,为类的静态变量赋予初始值. 在程序中,静态变量的初始化有两种途径: 1.在静态变量的声明处进行初始 ...
- C语言退出多层嵌套循环技巧
由于break语句只能影响它的最内层循环,要想立即从深层嵌套循环中退出,有哪些方法呢? 1.使用goto语句: while(condition1) { while(condition2) { whil ...
- iOS UITableViewController出现crash
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to de ...
- 扫描项目里没有使用的图片mac工具,删除没有使用的图片以减小包的体积
[链接]netyouli/WHC_ScanUnreferenceImageToolhttps://github.com/netyouli/WHC_ScanUnreferenceImageTool
- HTML Basic Document and UML
HTML Basic Document <html> <head> <title>Document name goes here</title> < ...
- OBST(Optimal Binary Tree最优二叉搜索树)
二叉搜索树 二叉查找树(Binary Search Tree),(又:二叉搜索树,二叉排序树)它或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的 ...
- 迪杰斯特拉算法——PAT 1003
本文主要是将我对于我对于迪杰斯特拉算法的理解写出来,同时通过例题来希望能够加深对于算法的理解,其中有错误的地方希望大家指正. 迪杰斯特拉算法 我将这个算法理解成一个局部到整体的算法,这个方法确实越研究 ...
- C# Async Await 注意事项
Avoid Using Async Void --- 避免使用async void async void 只能用于事件处理函数.并且保证永远不在用户代码中调用这些事件处理函数. async void ...
- Composer管理PHP包
安装 Composer包含两大逻辑部分:一个是用来存储包,另一个是命令行应用程序,帮助你发现.下载.更新和分享代码. $ cd/path/to/my/project $ curl -s http:// ...
- Stanford coursera Andrew Ng 机器学习课程编程作业(Exercise 2)及总结
Exercise 1:Linear Regression---实现一个线性回归 关于如何实现一个线性回归,请参考:http://www.cnblogs.com/hapjin/p/6079012.htm ...