javaandroidxml-drawable

How do I draw this round rectangle?


enter image description hereI am a beginer in Android doing an internship and i have been given the task to complete this navigation drawer for the app.Any help would be highly appreciated


Solution

  • Create new drawable and add the following code:

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
    
        <item>
            <shape android:shape="rectangle">
                <corners android:topLeftRadius="20dp" android:bottomRightRadius="20dp"/>
                <solid android:color="@color/semi_transparent_white"/>
            </shape>
        </item>
    </selector>