user interface - Android, Unexpected button left and right paddings -


i want make button, left right top , bottom paddings same. this:

enter image description here

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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -