android picture frame
I'm new to android i'm developing small application i want to arrange pictures in screen just like tumbnail view and want scroll on al开发者_运维百科l picture then i have to able to select the one picture after touching the picture on the screen how can i do it? plz help me
Thanks in Advance.
Well you can do that using a Gallery control to scroll the thumbnails, then when you select the picture (using the method gallery.setOnItemClickListener()) that image will be showed in the ImageView.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Gallery
android:id="@+id/gallery1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/image1"
android:layout_width="320px"
android:layout_height="250px"
android:scaleType="fitXY" />
</LinearLayout>
精彩评论