gpt4 book ai didi

android - 使线性布局水平滚动

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:31:14 26 4
gpt4 key购买 nike

如何使线性布局水平滚动?我只是在 myscrollview 中包装了一个线性布局,我也做了我的 XML 文件中需要的,但它仍然无法水平滚动超过线性布局大小的内容。这是我的 XML:

    <ScrollView 
android:id="@+id/scroller"
android:layout_marginTop="16dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/popup"
android:fadingEdgeLength="5dip"
android:scrollbars="horizontal"
android:overScrollMode="always"
android:isScrollContainer="true"
android:scrollbarAlwaysDrawHorizontalTrack="true"
>

<LinearLayout
android:id="@+id/tracks"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1"
android:padding="10dip"/>

</ScrollView >

<ImageView
android:id="@+id/arrow_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/arrow_up" />

<ImageView
android:id="@+id/arrow_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/scroller"
android:layout_marginTop="-4dip"
android:src="@drawable/arrow_down" />

</RelativeLayout>

最佳答案

关于android - 使线性布局水平滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12317648/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com