Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/205.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
类似Ios的Android图像滑块_Android_Android Ui - Fatal编程技术网

类似Ios的Android图像滑块

类似Ios的Android图像滑块,android,android-ui,Android,Android Ui,如何制作包含两部分的android图像滑块。一部分是水平图像滑块(thumnail),第二部分是选定图像的原始图像。 此视图类似于ios中的ios水平视图: 您需要使用图库和图像视图 1:布局: <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:layout_width="fill_parent"

如何制作包含两部分的android图像滑块。一部分是水平图像滑块(thumnail),第二部分是选定图像的原始图像。 此视图类似于ios中的ios水平视图:

您需要使用
图库
图像视图

1:布局:

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">

   <ImageView
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_weight="70"/>

    <Gallery
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_weight="30"/>

</LinearLayout>

2:使用适配器初始化库

3:为需要更改上面给出的imageView的库项目定义一个McClickListener

或者,您可以使用此处给出的完整代码: (与您正在尝试的操作类似)