Как сделать дизайн материала Заполненные текстовые поля в Xamarin Andriod - PullRequest
0 голосов
/ 03 апреля 2019

Я хочу использовать дизайн материала Filled TextField в Xamarin andriod. Всплывающая метка работает точно, но я хочу сделать цвет фона, как Give Image. Динт Знай, как я использую @style of Material design, чтобы сделать текстовое поле таким.

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>

1 Ответ

0 голосов
/ 04 апреля 2019
<?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>
...