android - RelativeLayout match_parent not working -
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:background="@drawable/ic_shade" android:layout_height="match_parent" > <textview android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerinparent="true" android:gravity="center" android:textsize="54sp" android:layout_centervertical="true" android:textcolor="@android:color/white" android:text="مبروك \nلقد ربحت كوبون"/> </relativelayout>
what happens, doesnt take entire width/height , dont see background on entire page.i using activity transparent. below code activity, if add
< item name="android:windowfullscreen ">true</item>
to below part works.. dont want because resizing previous activity.
<style name="theme.transparent" parent="android:theme"> <item name="android:windowistranslucent">true</item> <item name="android:windowbackground">@android:color/transparent</item> <item name="android:windowcontentoverlay">@null</item> <item name="android:windownotitle">true</item> <item name="android:windowisfloating">false</item> <item name="android:backgrounddimenabled">false</item> </style> <!-- application t
your textview filling whole screen, change layout_height , layout_width attributes of text view wrap_content. textview in center , background appear on entire screen
Comments
Post a Comment