w Relative layout mam zdefiniowane kilka przycisków, niestety kazdy z nich dostaje inną szerość
czy ozna w jakis sposób tak zdefiniować, aby kazdy z przysków mial identyczną szerokość ?
Oczywiscie moge w _width podac np 30sp, ale na ekranach o róznych rozmiarach bedzie to różnie wyglądać, a mi zależy zeby niezaleznie od ekranu kazdy z tych przycisków zajmowal np 30% szeroskosci ekranu .
Jak to zrobic ?
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="@color/indigo"
android:padding="2sp">
<Button android:id="@+id/bttbooks" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/button1" android:text="Books"
android:drawableTop="@drawable/books" />
<Button android:id="@+id/bttauthors" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_centerInParent="true"
android:text="Authors" android:drawableTop="@drawable/authors" />
<Button android:id="@+id/bttpublishers" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_toRightOf="@+id/bttauthors"
android:text="Publishers" android:drawableTop="@drawable/publishers" />
</RelativeLayout>