Reputation: 13
I want my TextView
to Cover the whole screen in a instance and override all the components in that XML file. 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.
Upvotes: 0
Views: 949
Reputation: 3110
<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>
Upvotes: 1
Reputation: 986
It's likely that you have padding set in the parent. match_parent is a little more modern :)
Upvotes: 0