由网友(叼着奶瓶逛青楼)分享简介:我有很多在屏幕上的项目,我需要使用滚动条,使用户可以向下滚动。然而,滚动或者是不可见的,或者它不工作。这怎么可能给一个滚动条添加到的LinearLayout ? I have lot of items on the screen and I need to use the scrollbar so the user...
我有很多在屏幕上的项目,我需要使用滚动条,使用户可以向下滚动。然而,滚动或者是不可见的,或者它不工作。这怎么可能给一个滚动条添加到的LinearLayout
?
I have lot of items on the screen and I need to use the scrollbar so the user can scroll down. However, the scroll is either not visible or it's not working. How is it possible to add a scrollbar to a LinearLayout
?
推荐答案
裹线性布局与<滚动型>
见这里的一个例子:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Content here -->
</LinearLayout>
</ScrollView>
</LinearLayout>
相关推荐
最新文章