I was reading the Gallery View tutorial : http://developer.android.com/resources/tutorials/views/hello-gallery.html. Is there anyway I can position the images at the bottom and not at the top? In other words, I would like to show the toast messages above the images.
Asked
Active
Viewed 759 times
1 Answers
1
modify your res/layout/main.xml something like
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Gallery
android:id="@+id/gallery"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
Moreover you can also set the Toast
position toast.setGravity(Gravity.TOP|Gravity.LEFT, 0, 0);

Mohammed Azharuddin Shaikh
- 41,633
- 14
- 96
- 115
-
Thanks.. This seems to be working. If you don't mind, I had one more query. Lets say I wish to show a webview or a video when a particular image in a gallery view is clicked. Would it be possible to show it above the images of the gallery view. I am not asking about how do I show a video. Just wanted to ask if similar to toast we can change the position of a webview relative to the images at the bottom – ambit Apr 11 '12 at 06:50
-
Yes you can, define webview in layout xml