如何在图库视图的末尾设置图像(左右)

时间:2010-08-23 11:38:50

标签: android

朋友的,    我需要帮助在我的画廊视图的两端放置图像(后退和前进图像),我有画廊列出菜单水平滚动,这个画廊在RelativeLayout如何在画廊的两端无需滚动即可获得图像。

提前致谢。

2 个答案:

答案 0 :(得分:3)

我会稍微修改一下Praveen的答案:

<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
    <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" />
    <Gallery android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1"/>
    <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>

android:layout_weight =“1”in在这里非常重要。

答案 1 :(得分:1)

答案就在你的问题中。双方都放到imageview。示例布局如下所示

<LinearLayout>
    <ImageView....../>
    <Gallery .../>
    <ImageView .../>
</LinearLayout>

希望它有所帮助。