难道不是API 21日在工作的EditText填充 [英] Doesn't work EditText padding in the API 21

查看:147
本文介绍了难道不是API 21日在工作的EditText填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

难道不是API 21.我尝试这样做的空项目,仅与单​​EDITTEXT工作的EditText填充,但它仍然无法正常工作。

Doesn't work EditText padding in the API 21. I try to do it in empty project, only with single editText, but it still doesn't work.

设置填充编程工作,但在我的作品之后,我发现了很多EditTexts不同的填补处理,并设置填充编程是不正确的方法。

Set padding programmatically works, but in my work project, I've a lot of EditTexts with different paddings and set padding programmatically isn't right way.

在API级别19 XML填充效果很好。

On API level 19 xml padding works well.

有没有解决方案?

这是我的EditText XML code:

This my EditText xml code:

   <EditText
   android:id="@+id/et_text"
   android:text="Text"
   android:paddingLeft="20dp"
   android:paddingStart="20dp"
   android:paddingRight="20dp"
   android:paddingEnd="20dp"
   android:layout_marginLeft="30dp"
   android:layout_marginRight="30dp"
   android:layout_width="match_parent"
   android:layout_height="45dp"/>

在结果,我有:

In the result, I've got:

我想到:

推荐答案

这是Android的错误。在未来这将是修复。

This is android bug. In future it will be fix.

<一个href="http://$c$c.google.com/p/android/issues/detail?can=2&start=0&num=100&q=label%3APriority-Small&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=77982#makechanges">Bug在谷歌code报告。

这篇关于难道不是API 21日在工作的EditText填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆