<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="140dp"
android:background="@color/colorPrimary">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="200dp"
android:layout_alignParentBottom="true"
android:layout_below="@+id/image"
android:layout_centerHorizontal="true"
android:fillViewport="true"
android:scrollbars="vertical"
>
<TextView
android:id="@+id/prayerMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="please God forgive me for all my mistakes i have ever done in my life please God forgive me for all my mistakes i have ever"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#ffffff"
/>
</ScrollView>
</RelativeLayout>
这是我的xml文件,滚动视图不滚动。滚动视图不滚动自定义视图内的列表视图
任何人都可以请建议一个解决方案?
我使用一个ListView自定义视图中使用自定义适配器滚动视图的
该XML文件在这里给出的动态布局加法? ListView项目? – Marat
似乎这是ListView项目...建议不要在ListView中使用ScrollViews,因为它几乎违背了ListView的目的......有很多关于StackOverflow和Internet上的帖子。布局中还存在多个其他错误:RelativeLayout具有比scrollview更小的设置高度。但即使你这样做,你也不会看到结果,因为嵌套滚动容器不支持嵌套滚动 –