Question

I need help on placing images(back and forward images) at two ends of my gallery view. I have a gallery to list menus to scroll horizontally, and this gallery is in RelativeLayout how can I get the images at two ends of the gallery without scrolling.

Thanks in advance.

Was it helpful?

Solution

answer is in your question itself. put to imageview on both sides. the sample layout looks like below

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

Hope it helps.

OTHER TIPS

I would modify Praveen's answer a bit:

<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 is very important here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top