2010-05-20 67 views
1

我是新来的android我正在开发小应用程序我想在屏幕上安排图片就像tumbnail视图,并希望在所有图片上滚动然后我必须能够在触摸图片后选择一张图片屏幕我怎么办? PLZ帮我安卓图片框架

在此先感谢。

+0

我认为你必须改变你的问题。这很难理解。而且非常一般,你应该尝试提出更具体的问题。 – Janusz 2010-05-20 07:23:18

回答

0

那么你可以使用Gallery控件来滚动缩略图,然后当你选择图片(使用方法gallery.setOnItemClickListener())该图像将显示在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>