Android 在FrameLayout中滚动不工作
当我运行程序的作品只是滚动(4),而其他人不工作,所有他们都分享了一个长文本!!! 如果您看到的是具有不同Id的通用格式的所有文本。 请注意,所有文本都是由Java代码提供的长文本。 这是我目前的布局Android 在FrameLayout中滚动不工作,android,xml,scroll,Android,Xml,Scroll,当我运行程序的作品只是滚动(4),而其他人不工作,所有他们都分享了一个长文本!!! 如果您看到的是具有不同Id的通用格式的所有文本。 请注意,所有文本都是由Java代码提供的长文本。 这是我目前的布局 <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/tabbackground" >
<ScrollView
android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="@+id/page1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="@+id/ScrollView02"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="@+id/page2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="@+id/ScrollView03"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="@+id/page3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
<ScrollView
android:id="@+id/ScrollView04"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginBottom="130dp"
android:fillViewport="true"
android:paddingBottom="10dp"
android:paddingTop="10dp" >
<TextView
android:id="@+id/page4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center|top"
android:text="Dummy Text"
android:textSize="18sp" >
</TextView>
</ScrollView>
</FrameLayout>
关于您所做更改的一些细节将改进此答案只需添加以下内容,android:fadeScrollbars=“true”android:crollbars=“vertical”
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
tools:context=".Fri"
android:background="#fff"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<TextView
android:textSize="16sp"
android:textColor="#000"
android:fadeScrollbars="true"
android:scrollbars="vertical"
android:layout_margin="10dp"
android:textAlignment="viewStart"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:text="@string/mon">
</TextView>
</LinearLayout>
</ScrollView>
</FrameLayout>