我想在Xamarin andriod.Floating标签中使用材质设计Filled TextField工作准确,但我想使背景颜色像Give Image。 Dint知道我如何使用@style of Material设计制作像这样的文本字段。
这是我用来实现它的代码:
<!-- <item> -->
<!-- <shape android:shape="rectangle"> -->
<!-- 1 Draw a 2dp width border around shape @1@ -->
<!-- <stroke -->
<!-- android:color="#004d40" -->
<!-- android:width="2dp" --> <!-- /> -->
<!-- </shape> -->
<!-- </item> -->
<!-- Overlap the left, top and right border using background color -->
<item android:bottom="7dp">
<shape android:shape="rectangle">
<solid android:color="#F8F9FA"/>
</shape>
</item>
</layer-list>
<?xml version="1.0" encoding="utf-8" ?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- <item> -->
<!-- <shape android:shape="rectangle"> -->
<!-- 1 Draw a 2dp width border around shape @1@ -->
<!-- <stroke -->
<!-- android:color="#004d40" -->
<!-- android:width="2dp" -->
<!-- /> -->
<!-- </shape> -->
<!-- </item> -->
<!-- Overlap the left, top and right border using background color -->
<item
android:bottom="7dp">
<shape android:shape="rectangle">
<solid android:color="#F8F9FA"/>
</shape>
</item>
</layer-list>