Rounded corner for textview in android

I have a textview and want its corner to be in round shape. I already know it can be done using android:background=”@drawable/somefile”. In my case, this tag is already included so cannot use again. e.g android:background=”https://stackoverflow.com/questions/18781902/@drawable/mydialogbox” is already there to create image in background <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”wrap_content” android:layout_height=”fill_parent” android:layout_gravity=”top” android:background=”https://stackoverflow.com/questions/18781902/@drawable/mydialogbox” android:orientation=”horizontal” > <TextView android:id=”@+id/textview_name” android:layout_alignParentTop=”true” … Read more

How to make layout with rounded corners..?

How can I make a layout with rounded corners? I want to apply rounded corners to my LinearLayout. 2Best Answer 21 1: Define layout_bg.xml in drawables: <?xml version=”1.0″ encoding=”UTF-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android”> <solid android:color=”#FFFFFF”/> <stroke android:width=”3dp” android:color=”#B1BCBE” /> <corners android:radius=”10dp”/> <padding android:left=”0dp” android:top=”0dp” android:right=”0dp” android:bottom=”0dp” /> </shape> 2: Add layout_bg.xml as background to your layout android:background=”@drawable/layout_bg”

How do I put a border around an Android textview?

Is it possible to draw a border around a textview? 23 s 23 You can set a shape drawable (a rectangle) as background for the view. <TextView android:text=”Some text” android:background=”@drawable/back”/> And rectangle drawable back.xml (put into res/drawable folder): <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle” > <solid android:color=”@android:color/white” /> <stroke android:width=”1dip” android:color=”#4fa5d5″/> </shape> You can use @android:color/transparent for the … Read more