Reputation: 2821
hi i have a hard time making this buttons look good, can i do it normal xml file or should i use styling
below is my xml code
<Button
android:id="@+id/cancelbtn"
android:textSize="18sp"
android:layout_marginLeft="2dip"
android:layout_width="wrap_content"
android:layout_height="45dip"
android:layout_weight="1.0"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:text="Cancel"
android:textColor="#000000" />
<Button
android:id="@+id/startbtn"
android:background=""
android:textColor="#000000"
android:layout_alignTop="@+id/fbcancel"
android:layout_toLeftOf="@+id/fbcancel"
android:textSize="18sp"
android:layout_marginRight="2dip"
android:layout_width="wrap_content"
android:layout_height="45dip"
android:layout_weight="1.0"
android:text="Start" />
the start button is big in height and small in width..not able to make exact as cancel buton
Upvotes: 0
Views: 205
Reputation: 1387
Remove android:layout_weight="1.0"
from both buttons and android:layout_alignTop="@+id/fbcancel"
from start button
Upvotes: 0
Reputation: 631
Due to different number of characters in the Button Text it's showing like this. you need to give the fixed width and height to the button.
See this link to solve your problem.
Upvotes: 2