[英]I want text view to cover whole Screen
I want my TextView
to Cover the whole screen in a instance and override all the components in that XML file. 我希望
TextView
能够覆盖实例中的整个屏幕,并覆盖该XML文件中的所有组件。 How can I do this? 我怎样才能做到这一点?
I have tried by setting fill_parent
to both android:layout_width
and android:layout_height
but it does not work. 我尝试通过将
fill_parent
设置为android:layout_width
和android:layout_height
来尝试,但是它不起作用。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="fill_parent"
android:text="TextView" />
</RelativeLayout>
It's likely that you have padding set in the parent. 您的父级中可能设置了填充。 match_parent is a little more modern :)
match_parent更现代一些:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.