I am placing an application bar on the top of the screen and it looks as the following figure:
Now i want to set a text over the image, so that the image looks as follows:
How to set a text over an image? Thanks in advance
I am placing an application bar on the top of the screen and it looks as the following figure:
Now i want to set a text over the image, so that the image looks as follows:
How to set a text over an image? Thanks in advance
If you simply want text centered over an image, all you need is a TextView, no image view. Set
android:background="@drawable/yourImage"
on the TextView.FrameLayout
(Tutorial)Or
2.Use an image as a background:
android:background="@drawable/yourImage"
You can use FrameLayout to achieve text over Image as below:-
there many way to display text over an image
1) u can make this image with text.. 2) u can set background(this image) for textview.
Please try the below Code.
That's how I did it and it worked exactly as you asked for:
Use Relative layout for this