search

Home  >  Q&A  >  body text

Android EditText android:background="@null"

Android EditText android:background="@null" 在模拟器上背景为

可是在真机上就变成了这样:

这个是为什么啊?

巴扎黑巴扎黑2772 days ago1908

reply all(12)I'll reply

  • PHPz

    PHPz2017-04-17 13:05:31

    This is related to the mobile phone and system version. Some mobile phones will not draw the background of the parent layout, and the background of the child view is empty, which will cause the background to be black

    reply
    0
  • 黄舟

    黄舟2017-04-17 13:05:31

    The best display is to set a background. If you don't want to set a background for the edittext, you must ensure that its parentview or parent parent view sets the background. In short, don't rely on the android system.

    reply
    0
  • Cancelreply