How to zooming whole gallery? - android

I try to display images with gallery view and it works fine, now I would like to add a zoom but the WHOLE gallery, not selected image.
The point is that all images are expanded and increased spacing between them.
How to do it?

Not sure how you plan to do it, but if you just simply change all the candidate image size, the space among them would get bigger proportionally.
You can try setup the style of each frame in the gallery view. Steps are like:
1. override the gallery adapter, implement the getView funciton.
2. for imageView, setLayoutParams, setScaleType, both of which can be reference in the imageView doc, read the doc and adjust the params.

Put images into WebView. Actually make html page referencing your local images, put it into <table> element, and let WebView provide zooming. This will be fast, hw-accelerated, and will zoom as you desire.

Would it be good solution to change size of Gallery widget from code as well as space between images, according to zoom level, so it fits to your needs?

Related

Moving an image inside in other frame image android

I have a frame image and another image selected from gallery. What i want is to place that image inside the transparent part of that frame image and also I can apply onTouchListener on the image selected from gallery.
Like in the app whose link is provided following.
https://play.google.com/store/apps/details?id=com.lyrebirdstudio.pipcamera
Any idea or concept will be helpful.
My IDEA
Here is what i am thinking to create a relative layout and setting the Picture Frame as a background and then scaling the other image according to the size of the relative layout. Then i can apply onTouchlistener on the image easily.
Am i going in right direction or there is some better way though which i can achieve the desire results?
Thanks in advance.
http://stacktips.com/tutorials/android/how-to-drag-a-view-in-android
OR
how to drag an image by touching in android?
hope it helps..

Image being set from Bitmaps is making the rest of the layout slow?

I have an ImageView's image being set from a Bitmap from the Gallery. But when I actually have it set. It seems to slow the rest of the functions like entering text in the EditText fields. Is this because of the image being used and if so would using Picasso help? Or is it the layout of the XML and the image being pushed up thanks to the Phone's Keyboard? I know you can reduce the size of the actual Bitmap to be set but I would actually like to know if this might be the case. Thank you!

Load a very large Image in android

Assumes I have a picture, it very large images or other sets of content where you are only looking at small bits at a time, because you can start seeing your content without having to load it all into memory at once.
In iOs we can use CATiledLayer to repeatedly draw tiles to fill up view’s background
In Android I can see Google Map, It also load each part of map when you scroll but I don't understand what is solution of them.
I want know what is the solution same CATiledLayer in Android or other to load very large Image
you can actually scale down the bitmap according to the size of the image view.
Don't give wrap_content in width and height try to give a relative width and height.
use
ImageView.getheight()
ImageView.getWidth()
get the size and load according to it
see this link
http://developer.android.com/training/displaying-bitmaps/load-bitmap.html#read-bitmap
You can use a library load images efficiently and manage caching them instead of downloading them again. I suggest Picasso or Glide. This tutorial compares between them and explains few features.
I hope it's useful.

How can I manage height and width of images coming from Google app engine in list view?

I am developing an android application using Google app engine.We have custom list view in which image has to be shown. I have used lazy loading for list view to load more data on demand.But problem is here, I am getting images from server, User can upload images of any size. Being used such images by user, I am not able to manage height and width for every image in list view List view is looking very ugly. How can I manage such images in specific height and width in image view?
Please share your best answer.
Thanks,
Prashant.
You can use the Google Images API for this. It has the capability to resize images have a look at
https://cloud.google.com/appengine/docs/java/images/
Using this you can
Resize
Rotate
Flip horizontally
Flip vertically
Crop
any image at runtime
Now when fetching the images use resize to scale down images to a specific dimension and use it in your listview
Simply there are 2 options.
Use android's ImageView.ScaleType
http://developer.android.com/reference/android/widget/ImageView.ScaleType.html
ImageView iv = someView;
iv.setScaleType(CENTER_CROP) // also CENTER_INSIDE, CENTER, whatever you want.
or in xml
<ImageView
...
android:scaleType="center" />
use blobstore magic url
https://cloud.google.com/appengine/docs/python/images/functions#Image_get_serving_url

Displaying images from the web?

How to display an image using a URL of a known jpg, png ..etc. File ?
I want an image , and I want it to be loaded from the internet from a particular website.
With that done,
I would like to make that image of an appropriate size...
Say I put the width as the same as screen_width (size)....What about the height ? I don't want to spoil the ratio of height/width of the original image...So is the height automatically set to account for the ratio ? or do I have to put in some value myself ...?
Plus, I want it to be zoomable.
To load images from website, you need to get the path from website server where the photo is stored. For image displaying put height as wrap_content mode so that the space will occupy as much as needed to display.
For this purpose you can use a Lazy Adapter. Here you can find a good example of it: https://stackoverflow.com/a/3068012/2436683. Maybe you can use it as a starting point.

Categories

Resources