I have the below view that I need to create. I have the following XML, but the text does not show up and the height fills the entire parent instead of wrapping the content? Any help on creating the below screenshot would be appreciated.
playing.xml
<View
android:background="@drawable/rounded_edges"
android:text="Current Track"
android:textColor="#FFFFFF"
android:id="@+id/current_track"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:editable="false">
</View>
rounded_edges.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#1F1F1F"/>
<corners android:radius="5px"/>
<padding android:left="20dp" android:top="20dp" android:right="20dp" android:bottom="20dp" />
</shape>
First you have to create a one xml file for rounded edges, then create a one linear layout and set that rounded edges in that back ground and then dynamically add text view to that particular linear layout .
Here i attached my rounded edge xml file