
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 0.71 KB | hits: 26 | expires: Never
How to Display a picture from gallery
<activity android:name="com.android.camera.ImageGallery"
android:label="@string/gallery_label"
android:configChanges="orientation|keyboardHidden"
android:icon="@drawable/ic_launcher_gallery">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/image" />
</intent-filter>
</activity>
ImageView i;
i.setAdjustViewBounds(true);
//also, you shoudn't use hardcoded pixel values (in
i.setLayoutParams(new Gallery.LayoutParams(400, 300));)