开发者

A question on making TitleBar

开发者 https://www.devze.com 2023-03-13 05:37 出处:网络
I want to make a title bar which has a image and text with ImageView and TextView respectively.I want text on image.I am adding and it is disp开发者_JAVA技巧laying but text and image separately.How ca

I want to make a title bar which has a image and text with ImageView and TextView respectively.I want text on image.I am adding and it is disp开发者_JAVA技巧laying but text and image separately.How can I make text on image?


You can use TextView and set background image to the textview to display text on image

Example

<TextView
android:id="@+id/textview2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="TextView" 
android:background="@drawable/top_color_bar"/> 
0

精彩评论

暂无评论...
验证码 换一张
取 消