1
這是我的佈局畫廊 //gallery.xml機器人的GridView獲得所有圖像GALLARY
<FrameLayout android:id="@+id/FrameLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout android:id="@+id/LinearLayout01"
android:layout_gravity="top"
android:layout_height="50dp"
android:layout_width="fill_parent">
<Button android:layout_gravity="left"
android:id="@+id/btnPhotos"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:textStyle="bold"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="Photos"/>
<TextView android:id="@+id/TextViewAlbumName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:layout_gravity="center"
android:text="Album Name"
/>
<Button android:layout_gravity="right"
android:id="@+id/btnCancel"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:textStyle="bold"
android:layout_width="100dp"
android:layout_height="wrap_content" android:text="Cancel"/>
</FrameLayout>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:layout_gravity="bottom"
android:layout_marginTop="50dp"/>
</FrameLayout>
我的問題是我怎麼能在我的gridview的所有圖片庫顯示? 我知道How to pick an image from gallery (SD Card) for my app?,但我需要留在我的應用程序,並獲得相冊的名稱。
我不喜歡顯示畫廊的應用程序,因爲我會失去我的按鈕。 – user2911250
謝謝,我發現了一個很好的解決方案:http://vikaskanani.wordpress.com/2011/07/20/android-custom-image-gallery-with-checkbox-in-grid-to-select-multiple/ – user2911250