[英]scroll bar does not work?
<ScrollView
android:id="@+id/sv_chat"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/layout_bottom"
android:background="#ffffffff" >
<LinearLayout
android:id="@+id/layout_chatrecord"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="bottom"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
If I add android:layout_gravity="bottom"
in the LinearLayout
, the ScrollView
can't work. 如果我在
LinearLayout
添加android:layout_gravity="bottom"
,则ScrollView
无法正常工作。 When I put view in LinearLayout
all the time,the view will appear from the bottom up which is I want.While the result is ScrollView
can't work,the view put first can't be seen.How to solve it? 当我一直将视图放在
LinearLayout
中时,该视图将从下往上显示,这是我想要的。结果是ScrollView
无法工作,但看不到放在最前面的视图。如何解决?
Try this.. 尝试这个..
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView01" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:scrollbars="vertical"
android:scrollbarAlwaysDrawVerticalTrack="true">
</LinearLayout>
</ScrollView>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.