在Android中使用android:backgroundTint需要什么

时间:2017-04-11 10:09:44

标签: android android-xml

我真的很困惑android的设计/前端如何工作。很多问题在我的脑海中,为什么android不提供简单的方法/方法(如在html中像border-bottom,或在JavaFX中)在textview中添加边框或其他等等等等。但害怕可能是stackoverflow不允许我问这样的问题。我想在这里询问的一个问题是使用android:backgroundTint

需要什么

因为在EditText中它的工作非常简单。

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Edting"
android:backgroundTint="#00FFFF"
 />

但是在TextView中使用它或添加边框我必须使用可绘制的实用程序。

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Edting"
android:backgroundTint="#00FFFF" // not working at all
 />

在某处,我读到它为背景添加了阴影。但为什么它正在改变底线。所以另一个问题可能是android:backgroundTint

的实际目的

0 个答案:

没有答案