Android: machen Bildansicht entsprechen der Höhe einer anderen Ansicht

Ich habe ein problem entwerfen ein layout einer Anwendung. Dies ist, was ich versuche zu bekommen:

=========================================================
|  =============   ================   ================  |
|  |           |   | LinearLayout |   | LinearLayout |  |
|  |           |   | ============ |   | ============ |  |
|  |           |   | | TextView | |   | | TextView | |  |
|  | ImageView |   | ============ |   | ============ |  |
|  |           |   | ============ |   | ============ |  |
|  |           |   | | TextView | |   | | TextView | |  |
|  |           |   | ============ |   | ============ |  |
|  |           |   | ============ |   | ============ |  |
|  |           |   | | TextView | |   | | TextView | |  |
|  |           |   | ============ |   | ============ |  |
|  =============   ================   ================  |
=========================================================

Dies ist whay, die ich bisher gemacht habe (ich habe entfernt die ids einer anderen Zeug aus Gründen der übersichtlichkeit):

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:gravity="center_vertical" >


    <ImageView
        android:contentDescription="@string/logo"
        android:layout_width="wrap_content"
        android:layout_height="match_parent" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="left|center_vertical" >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="right|center_vertical"
        android:orientation="vertical" >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true" />

        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true" />

    </LinearLayout>

</LinearLayout>

Mein problem ist, dass ich verwenden möchten, hochauflösende Bilder und skaliert Sie runter zu entsprechen, die die höchsten von den linearlayouts daneben. Meine Idee ist, dass android-verkleinere das Bild auf Geräten mit niedrigen dpi, daher mit den gleichen Bildern und layout für alle Plattformen.

Wie es jetzt ist, die wichtigsten container-Höhe wird so groß wie die Bildhöhe. Was ich will ist der Haupt-container Höhe die gleiche ist wie die der "höchste" linearlayout und Kraft, die Bildansicht zu verkleinern, um den Haupt-container.

Irgendwelche Ideen?

Dank!

PD: Entschuldigen Sie mein Deutsch! :$

Schreibe einen Kommentar