我想让布局向下滚动。我已经看到一些这样的帖子,我试图做他们解释,但它不适合我。这就是我现在所拥有的,现在我的项目甚至不会开始,可能会导致它错位。在Android项目布局中添加滚动查看
这是我的代码看起来像:
<LinearLayout 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:orientation="vertical"
tools:context="com.example.rodekruis.Bezoek" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginBottom="20dp"
android:src="@drawable/rkz_logo" />
<ScrollView
android:id="@+id/scrollview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/textView1"
android:layout_width="244dp"
android:layout_height="276dp"
android:layout_gravity="center"
android:text="@string/title_activity_contact"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/black" />
<TextView
android:id="@+id/textView2"
android:layout_width="244dp"
android:layout_height="42dp"
android:layout_gravity="center"
android:layout_weight="0.39"
android:text="Klik hier voor de uitgebreide contactgegevens."
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/black" />
</ScrollView>
</LinearLayout>
滚动型只有一个孩子,它可以是一个视图组 –