类似Ios的Android图像滑块
如何制作包含两部分的android图像滑块。一部分是水平图像滑块(thumnail),第二部分是选定图像的原始图像。 此视图类似于ios中的ios水平视图:类似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"
您需要使用
图库
和图像视图
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
或者,您可以使用此处给出的完整代码:
(与您正在尝试的操作类似)