【问题标题】:MvxListView not displaying horizontallyMvxListView 不水平显示
【发布时间】:2014-03-12 00:52:20
【问题描述】:

在我的 Android 应用程序中,我创建了一个垂直布局,以将图像(缩略图)的水平列表置于列表中所选图像的较大视图之上。由于某种原因,我无法让水平列表水平显示,它只显示为垂直列表。

        <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="15">
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1">
            <Mvx.MvxListView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                local:MvxBind="ItemsSource Images"
                local:MvxItemTemplate="@layout/image_item" />
        </LinearLayout>
        <ImageView
            android:src="@drawable/BDSeal"
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:layout_margin="10.0dp"
            android:id="@+id/imageView1" />
    </LinearLayout>

【问题讨论】:

    标签: android mvvmcross


    【解决方案1】:

    在 Android 中,系统 ListView 仅是垂直的。

    有可用的开源水平列表视图 - 例如,cheesebaron 曾经提供过 http://blog.ostebaronen.dk/2012/12/horizontal-listview-for-mono-for-android.html - 我认为最近更新了。

    也有人使用 PageAdapter 来显示这种水平滚动的列表。

    【讨论】:

    • 噢!有道理,我有点像 Android 菜鸟,好像这还不明显。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-06-13
    • 2023-04-01
    • 1970-01-01
    • 2021-09-18
    • 1970-01-01
    • 2015-03-06
    • 2014-11-05
    相关资源
    最近更新 更多