user interface - Android, Unexpected button left and right paddings -
i want make button, left right top , bottom paddings same. this:
here layout:
<relativelayout android:layout_width="match_parent" android:layout_height="wrap_content"> <textview android:id="@+id/people_number_label" android:text="@string/number_of_people" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <button android:id="@+id/people_number" android:layout_torightof="@+id/people_number_label" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </relativelayout>
so way button works text view background drawable. drawable 1 you're seeing. text centered within drawable, see here. if want text appear in line prompt, button isn't going work you. you're better off making textview , setting xml background drawable rounded rect looks button, isn't.
another thing can try align_baseline 2 view. should align text, may push prompt down screen
Comments
Post a Comment