Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.71 KB  |  hits: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to Display a picture from gallery
  2. <activity android:name="com.android.camera.ImageGallery"
  3.                 android:label="@string/gallery_label"
  4.                 android:configChanges="orientation|keyboardHidden"
  5.                 android:icon="@drawable/ic_launcher_gallery">
  6.             <intent-filter>
  7.                 <action android:name="android.intent.action.VIEW" />
  8.                 <category android:name="android.intent.category.DEFAULT" />
  9.                 <data android:mimeType="vnd.android.cursor.dir/image" />
  10.             </intent-filter>
  11.  </activity>
  12.        
  13. ImageView i;
  14. i.setAdjustViewBounds(true);
  15. //also, you shoudn't use hardcoded pixel values (in
  16. i.setLayoutParams(new Gallery.LayoutParams(400, 300));)