Jak ustawić 50% szerokości
Mam LinearLayout w orientacji poziomej i 2 ImageView i chcę, aby ImagesView wypełniało 50% szerokości ekranu, aby pracować w każdym telefonie komórkowym lub tablecie o różnych rozmiarach.
Coś takiego:
+-------------+
|_____________|
| | |
| 50% | 50% |
| | |
|-------------|
| |
+-------------+
Najlepsze do tej pory:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:id="@+id/logo_c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_animado" />
<ImageView
android:id="@+id/logo_t"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo_animado2" />
</LinearLayout>