how to colour the outline of my text black in xml for android how to colour the outline of my text black in xml for android xml xml

how to colour the outline of my text black in xml for android


One way is to use shadow:

<TextView    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:textColor="#FFFFFF"    android:shadowColor="#000000"    android:shadowDx="0.0"    android:shadowDy="0.0"    android:shadowRadius="2.0" />

This gives white text a black outline. Adjust the radius accordingly to how thick you'd like it.


From what I can understand you want rectangle-like border for TextView correct me if I am wrong

then,,

You can set a shape drawable (a rectangle) as background for the view.

<TextView android:text="Some text" android:background="@drawable/black_bhgroung"/>

And rectangle drawable black_bhgroung.xml (put into res/drawable folder):

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >   <solid android:color="#00000000" />   <stroke android:width="1dip" android:color="#4fa5d5"/></shape>

Hope this helps...