Ich habe 4 TextView
s in meinem Activity
und ich verwende LinearLayout
mit vertikaler Ausrichtung. Top 1 TextView
ist eine Art Header (keine Notwendigkeit zu scrollen) als nächstes ist eine Art von Beschreibung, die ich scrollbar machen möchte. Das dritte ist wieder eine Überschrift (kein Scroll benötigt) und 4. ist die Beschreibung (muss scrollen). Ich versuchte, aber nur top TextView
(Header) und 2. TextView
(Beschreibung) wird auf dem Bildschirm angezeigt. Beschreibung ist scrollbar, aber das Problem ist, andere zwei TextView
sind versteckt. Seine Art von dummer Frage zu fragen, aber ich bin irgendwie hier fest, weil ich neu bei Android bin. Hier ist meine xml
.Scrollview in zwei Linearlayouts?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?android:attr/actionBarSize"
android:orientation="vertical"
android:padding="15dp"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#d0f7c9"
android:orientation="vertical"
android:padding="10dp"
>
<TextView
android:id="@+id/tvTitle"
style="?android:attr/listSeparatorTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="#ffffff"
android:textSize="20dp" />
</LinearLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#b3cff4"
android:orientation="vertical">
<TextView
android:id="@+id/tvShow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="20dp" />
</LinearLayout>
</ScrollView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Program Output"
android:textColor="@color/black"
android:textSize="25dp" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#d2b3f4">
<TextView
android:id="@+id/tvOutput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:textSize="20dp" />
</LinearLayout>
</ScrollView>
Sie meinen Tag. Vielen Dank –