怎么在android中出现滚动界面

2025-04-28 11:01:49
推荐回答(4个)
回答1:

  使用ScrollView即可。

  例如:

  android:layout_width="fill_parent"

  android:layout_height="fill_parent"

  android:scrollbars="vertical"

  android:fadingEdge="vertical"

  >

  android:orientation="vertical" android:layout_width="fill_parent"

  android:layout_height="wrap_content" android:padding="10dip"

  android:scrollbars="vertical"

  >

  注意的是:ScrollView也是一个layout布局,可以让它的内容数据显示不下的时候出现滚动条。但是不能在ScrollView中放置多个组件,Scrollview只能包裹一个子元素。可以在Scrollview中放置一个LinearLayout或其他layout来放置更多组件(Layout可以嵌套的)。

回答2:

不要一直按着屏幕滑动,朝上或者朝下(特别是在歌曲列表里)划一下手指离开就可以滚动

回答3:

不是有个标签

回答4:

供楼主参考……

android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="9"
>
android:layout_width="fill_parent"
android:layout_height="wrap_content">

android:layout_width="fill_parent"
android:layout_height="wrap_content">

android:id="@+id/username_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:text="@string/agreement_text"
/>