Android 如何在Gallery视图的末端设置图像(右侧和左侧)
我需要帮助在我的图库视图的两端放置图像(后退和前进图像)。我有一个图库,可以列出要水平滚动的菜单,而这个图库是相对的。你如何在不滚动的情况下获得图库两端的图像Android 如何在Gallery视图的末端设置图像(右侧和左侧),android,android-gallery,Android,Android Gallery,我需要帮助在我的图库视图的两端放置图像(后退和前进图像)。我有一个图库,可以列出要水平滚动的菜单,而这个图库是相对的。你如何在不滚动的情况下获得图库两端的图像 提前谢谢。答案就在你的问题本身。放在两侧的imageview。示例布局如下所示 <LinearLayout> <ImageView....../> <Gallery .../> <ImageView .../> </LinearLayout> 希望有
提前谢谢。答案就在你的问题本身。放在两侧的
imageview
。示例布局如下所示
<LinearLayout>
<ImageView....../>
<Gallery .../>
<ImageView .../>
</LinearLayout>
希望有帮助。答案就在你的问题本身。放在两侧的
imageview
。示例布局如下所示
<LinearLayout>
<ImageView....../>
<Gallery .../>
<ImageView .../>
</LinearLayout>
希望能有所帮助。我会稍微修改一下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在这里非常重要。我想稍微修改一下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”在这里非常重要