片段Android中的水平滚动视图 [英] Horizontal ScrollView in fragment Android

查看:57
本文介绍了片段Android中的水平滚动视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的 ScrollView 填充片段的完整布局并水平滚动,而不是垂直滚动.

I would like to make my ScrollView filling out the full layout of a fragment and scrolling horizontally, not vertically.

我怎样才能做到这一点?!

How can I achieve that?!

喜欢专辑封面

谢谢

推荐答案

不是垂直的,是水平的

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

    <HorizontalScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">
        // Add your ImageButtons
    </LinearLayout>
</HorizontalScrollView>

这篇关于片段Android中的水平滚动视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆