android - Button's text is only half visible -
i having troulbe fixing following issue. have button text ok. button nested inside linearlayout
. layout nested inside 2 relativelayout
. second/inner relativelayout
has `android:layout_margin="15dp". causing text inside button half visible. xml below. using because gives me "popup" dialog (x) button on top right corner.
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" > <relativelayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="15dp" android:padding="2dp" android:background="@drawable/xml_round_corners_background" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="15dp" android:background="@drawable/xml_round_corners_background" android:gravity="center_vertical|center_horizontal" android:layout_weight="1" > <linearlayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_weight="1" > <textview android:id="@+id/exittv" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|center_horizontal" android:textalignment="center" android:text="text....\n\n\n" android:textcolor="@color/white" /> </linearlayout> <linearlayout android:layout_weight="1" android:id="@+id/bluetooth_error_button_linearlayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" android:layout_below="@+id/exittv" > <button android:layout_margin="15dp" android:id="@+id/bt_error_message_ok_button" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/xml_botton1" android:text="ok" android:textcolor="@color/darkmagenta" /> </linearlayout> </linearlayout> </relativelayout> <button android:id="@+id/bt_error_message_x_button" android:layout_alignparentright="true" android:text="x" android:textcolor="#fff" android:background="@drawable/xml_round_dismiss_button" android:gravity="center_vertical|center_horizontal" android:layout_margin="7sp" android:layout_height="30sp" android:layout_width="30sp" android:textsize="15sp" android:textstyle="bold" android:onclick="cancelactivity" /> </relativelayout>
could please tell me can make text visible? have changed/addded/removed attributes linearlayout
, relativelayout
textview
, , button
well. not make work.
thanks
edit: photo how eclipse shows window, , how want be.
this partial screen shot phone. samsumg galaxy s iii mini (4.0" screen)
i jsut realized using xml file background each button. xml causing issues.
Comments
Post a Comment