Creating a rectangle shape with only two rounded edges

前端 未结 7 684
难免孤独
难免孤独 2021-02-01 03:26

I can create a shape that is a rectangle with all edges rounded. However, what I\'m wanting is a rectangle shape with only 2 of the edges rounded. Is this possible?

I\

相关标签:
7条回答
  • 2021-02-01 04:05

    You might find this helpful.

    <?xml version="1.0" encoding="utf-8"?>
    <!--  res/drawable/rounded_edittext.xml -->
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" android:padding="10dp">
     <solid android:color="#FFFFFF"/>
        <corners
         android:bottomRightRadius="0dp"
         android:bottomLeftRadius="0dp"
      android:topLeftRadius="15dp"
      android:topRightRadius="15dp"/>
    </shape>
    
    0 讨论(0)
提交回复
热议问题