zoukankan      html  css  js  c++  java
  • 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.

    路漫漫其修远兮 吾将上下而求索
  • 相关阅读:
    Tarjan专题
    Catalan数
    状压DP
    威尔逊定理证明:
    【fzoj 2376】「POJ2503」Babelfish
    Android 源码
    Android实现推送方式解决方案
    Android apk 签名
    圆角的实现
    Android 资源
  • 原文地址:https://www.cnblogs.com/hudabing/p/3780425.html
Copyright © 2011-2022 走看看