Skip to content Skip to sidebar Skip to footer

Imagedetailsactivity For A Recycler View

in my android app, I am listing the images' previews with network image view. I want that if user press the previews it opens an activity with viewpager and show the original image

Solution 1:

You can try this:

How to reduce an Image file size before uploading to a server

The idea is, before sending to the server, that image's size would be decreased and then download it, after that(e.g - in small ImageView),

Use something like this: Full doc: http://developer.android.com/reference/android/widget/ImageView.ScaleType.html

android:scaleType="centerCrop"

And then if the users clicked on the info Button(or whatever), the big ImageView will be shown But, with one difference between the height and weight of it than previous ImageView.

Here is an example for using that ImageView with android:scaleType="fitXY" :

<ImageViewandroid:layout_width="match_parent"android:layout_height="match_parent"android:contentDescription="Main Image"android:padding="1dp"android:scaleType="fitXY"android:src="@drawable/balloon" />

http://hmkcode.com/android-designing-whatsapp-like-user-profile-screen/

The point is, i think you don't need to store that image in your sdcard or wherever.just use it(store it) one time with the best quality :)

hope that helps.

Post a Comment for "Imagedetailsactivity For A Recycler View"