Wie man 50% für Breite setzt
Ich habe ein LinearLayout in horizontaler Ausrichtung und 2 ImageView und möchte, dass ImagesView 50% der Bildschirmbreite ausfüllt, damit es in jedem Mobiltelefon oder Tablet mit unterschiedlichen Größen funktioniert.
Etwas wie das:
+-------------+
|_____________|
| | |
| 50% | 50% |
| | |
|-------------|
| |
+-------------+
Das Beste bisher:
<?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>