如何在Xamarin Android中制作材料设计填充文本字段

问题描述 投票:0回答:1

我想在Xamarin andriod.Floating标签中使用材质设计Filled TextField工作准确,但我想使背景颜色像Give Image。 Dint知道我如何使用@style of Material设计制作像这样的文本字段。

This Is The Required OutPut of Material design

这是我用来实现它的代码:

<!-- <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>
xamarin.android material-design material-ui
1个回答
0
投票
<?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>
© www.soinside.com 2019 - 2024. All rights reserved.