美文网首页
Linearlayout scrollbars=“vertica

Linearlayout scrollbars=“vertica

作者: 湖南的肖逸飞 | 来源:发表于2020-09-28 21:09 被阅读0次

Linearlayout 的内容经常会超出屏幕,虽然有scrollbars="vertical"参数可以设置,然而并没有用。

正确的做法是在LinearLayout外嵌套一层ScrollView。

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    android:fadingEdge="vertical"

    android:scrollbars="vertical">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

        android:layout_width="match_parent"

        android:layout_height="match_parent"

        android:orientation="vertical">

            android:layout_width="match_parent"

            android:layout_height="wrap_content"

            android:text="请选择日期:"

            android:textColor="@android:color/holo_blue_dark"

            android:textSize="22sp" />

相关文章

网友评论

      本文标题:Linearlayout scrollbars=“vertica

      本文链接:https://www.haomeiwen.com/subject/jspjuktx.html