RelativeLayout Scrollbar
Ich habe viele Male versucht, die Elemente in meinem RelativeLayout zu korrigieren, aber ich erhalte nicht das erwartete Ergebnis:
Ich möchte die erste Schaltfläche nach rechts oben ausrichten und dann habe ich mehrere Textansichten und ich möchte, dass alle scrollbar sind. Wenn ich jedoch das Tag einfüge, wird eine Fehlermeldung angezeigt. Dies ist mein Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RL01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="5dp">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:id="@+id/btnBrowser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Browser"
android:layout_marginTop="5dp"
>
</Button>
<TextView
android:id="@+id/txtAuthor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="bold"
android:textColor="#143781"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:layout_below="@+id/btnBrowser"
>
</TextView>
<TextView
android:id="@+id/txtDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dp"
android:textColor="#8D89B3"
android:layout_marginTop="5dp"
android:layout_marginLeft="20dp"
android:layout_below="@+id/txtAuthor">
</TextView>
<TextView
android:id="@+id/txtTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dp"
android:textStyle="bold"
android:textColor="#000000"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:layout_below="@+id/txtDate">
>
</TextView>
<TextView
android:id="@+id/txtMsg"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="14dp"
android:textColor="#000000"
android:layout_marginLeft="20dp"
android:layout_below="@+id/txtTitle">
</TextView>
<Button
android:id="@+id/btnReply"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reply"
android:layout_marginTop="20dp"
android:layout_below="@+id/txtMsg"
android:layout_centerInParent="@+id/txtMsg">
</Button>
</ScrollView>
</RelativeLayout>