Android 滚动视图不工作
我有一个滚动视图,可以动态地填充代码。我希望如果我把太多的内容放在parant视图中,该视图会变成可滚动的。这是行不通的Android 滚动视图不工作,android,scrollview,Android,Scrollview,我有一个滚动视图,可以动态地填充代码。我希望如果我把太多的内容放在parant视图中,该视图会变成可滚动的。这是行不通的 <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_centerHorizontal="true"
android:id="@+id/layoutScoreBoardHeader"
android:layout_marginTop="15dp">
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/layoutScoreBoard"
android:orientation="horizontal"
android:layout_centerHorizontal="true"
android:layout_below="@id/layoutScoreBoardHeader">
</LinearLayout>
</RelativeLayout>
</ScrollView>
布局结构不正确。RelativeLayout应包装内容。在您的情况下,它将与初始ScrollView的大小相同,并且将忽略子大小。我有它。不知道有一个特殊的视图像水平滚动视图。但谢谢你们的反馈 显示您添加了什么以及如何添加