I have a problem that I explain better with this images:
Now I have this:
But I want this:
I want to have the background color of my textview stretch on all the width of the screen, but I don't know how to do it. Can someone help me?
Thanks! :)
Use match_parent
as the width :
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.