Polsterung in der Bildansicht Funktioniert nicht

Will ich ein screen machen, welches eine top-bar und ein Bild. Ich benutze TextView für die top-bar und Bildansicht für Bild. Ich möchte padding nur, um das Bild anzuzeigen. Meine xml ist unten gegeben. Die Polsterung Aktion nicht funktioniert. Kann jemand erklären, warum und was zu tun ist?

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"   
    android:background="@drawable/background" >

    <TextView android:id="@+id/topBar"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:text="@string/home"
        android:textSize="20sp"
        android:textColor="#ffffff"
        android:textStyle="bold"
        android:shadowColor="#000000"
        android:shadowRadius="1"
        android:shadowDy="-1" 
        android:gravity="center"
        android:background="@drawable/navBar"/>

    <ImageView android:id="@+id/image"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"   
        android:paddingLeft="10dp"
        android:paddingTop="10dp"
        android:paddingRight="10dp"
        android:paddingBottom="10dp"
        android:layout_below="@+id/topBar"        
        android:background="@drawable/image"/>

</RelativeLayout>
InformationsquelleAutor CrazyLearner | 2013-11-24
Schreibe einen Kommentar