Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 滚动条在整个屏幕上不显示_Android_User Interface_Scrollbar_Scrollview - Fatal编程技术网

Android 滚动条在整个屏幕上不显示

Android 滚动条在整个屏幕上不显示,android,user-interface,scrollbar,scrollview,Android,User Interface,Scrollbar,Scrollview,我在应用程序中使用了滚动视图。如果项目过多,将显示垂直滚动条。但是如果只有很少的项目,则垂直滚动条不会在全屏显示。是否可以在全屏显示滚动条 <ScrollView android:id="@+id/tile_view" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orien

我在应用程序中使用了滚动视图。如果项目过多,将显示垂直滚动条。但是如果只有很少的项目,则垂直滚动条不会在全屏显示。是否可以在全屏显示滚动条

<ScrollView android:id="@+id/tile_view"
                android:layout_width="fill_parent" android:layout_height="fill_parent">
                <LinearLayout android:orientation="vertical"
                    android:layout_width="wrap_content" android:layout_height="wrap_content">
                    <Button android:id="@+id/banner_btn" android:layout_width="wrap_content"
                        android:layout_height="wrap_content" android:background="@drawable/banner"
                        android:textColor="@android:color/white" android:textStyle="bold"
                        android:ellipsize="end" />

                    <LinearLayout android:id="@+id/left_right_columns"
                        android:paddingLeft="10dip" android:paddingRight="10dip"
                        android:paddingBottom="10dip" android:layout_width="fill_parent"
                        android:orientation="horizontal" android:layout_height="wrap_content">

                        <LinearLayout android:id="@+id/left_column"
                            android:layout_marginRight="9dip" android:layout_width="wrap_content"
                            android:layout_height="wrap_content" android:orientation="vertical" />

                        <LinearLayout android:id="@+id/right_column"
                            android:layout_width="wrap_content" android:layout_height="wrap_content"
                            android:orientation="vertical" />
                    </LinearLayout>
                </LinearLayout>
            </ScrollView>
您可以像这样使用ScrollView的XML属性

android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarAlwaysDrawHorizontalTrack="true"

有关更多信息,请参阅。

如果没有要滚动的项目,为什么需要滚动条。如果有足够的项目完全填满整个屏幕,如果没有全屏的滚动条,如果我们尝试滚动,则滚动视图似乎没有响应。因此,如果我们能够显示填充屏幕滚动条,我们可以指示用户没有更多可用的项目。@Kannapan:这是哪种语言?我试过了,但整个屏幕的滚动条仍然没有出现