Hi Tried removing the maxWidth attribute, it didn't help at all... - Lars
On 30 Mar., 20:31, sriharibabu ravi <sriandr...@gmail.com> wrote: > i think this is not problem of camera or gallery pic. > even in gallery if u choose pics of different sizes their sizes changes. > > android:maxWidth="250dip" > > i think this might be prob. > > On Tue, Mar 30, 2010 at 11:56 PM, Lars <axberg.l...@gmail.com> wrote: > > Hi > > > I'm developing an app, and I want the user to be able to get an image > > either from their gallery or to use the camera to get the image. The > > Intents are working fine, but im having trouble showing the pictures > > in my ImageView, if the image is comming from the Camera intent, the > > image is cropped and only shown a portion of it, when the image comes > > from the gallery intent the image is shown fine. > > > Here's the XML layout for the ImageView: > > <ImageView > > android:id="@+id/image" > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > > android:maxWidth="250dip" > > android:adjustViewBounds="true" > > android:scaleType="fitCenter" > > android:layout_margin="10dip" /> > > > And the Java code handling the onActivityResult method from the Camera > > intent > > // Insert the picture into Mediastore, and get the content Uri > > Uri currImageURI = > > Uri.parse(MediaStore.Images.Media.insertImage(this.getContentResolver(), > > (Bitmap)data.getExtras().get("data"), new Date().toString(), null)); > > > //Set the ImageView to show the image > > imgView.setImageURI(currImageURI); > > > Can anyone give me an idea of why this is happening? > > > - Lars > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > > To unsubscribe from this group, send email to android-developers+ > > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > > ME" as the subject. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.