I'm a newbie in Android. When I tried to create my dashboard using grid view, in different screens the images became small. I tried various methods to zoom it. But nothing worked for me. Can anyone suggest a solution for me ? I've 8 icons in my dashboard. Also when we put images in drawable folders , what is the size of images in each folder???
You can use auto resized images... GridView with Auto Resized Images on Android may work for you.. This explains a way to create a GridView with two columns and auto resized images inside each view
Related
I am implementing user wall like facebook but i want to display image
as with original size. And I am using view pager to display images.
So how to display images according to screen size?
Thanks in advance..
You need to use one of the scale types provided with ImageView class. How do you handle if the image is way larger than the screen, say taken from a DSLR at 3000x3000 resolution? What happens if the image is too small?
Have a look at the documentation for ImageView.ScaleType:
I need to load a lots of images (3500 images) to my android app (and then I will rotate with each of them in the application). But when I load each of them separately (creating new ImageView which I add to the array) then it takes about 10 seconds to load. I have tried to inflate them from XMLs since there is only 8 different images which I use but no visible changes.
I would be really grateful for any advice how to load it faster.
EDIT: I am creating a grid of hexagons, each hexagon is consisted of 6 triangles (this way I need to store only 8 different triangle images instead of storing image for each different hexagon). After the grid is loaded user can resize it. I need to load all the grid cell at once because there are many constrains between them. Also only operation I will do with the hexagons is to rotate them.
You can use cashing for bitmap images, the following tutorial link is helpful.
http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html
I have a lot of images in scrollview, I would like to know how to layout them so they would be seen the same on different resolutions. Like if I rotate screen some images would fill the gap.(All activity is only images)
You can use GridLayout.
Check Heterogeneous GridLayout,GridLayout and Row/Column Span Woe.
It might helpful for you.
This issue is behond displaying an image on a gridView but rather about memory limitation and caching(recycling and reusing etc..)
Take a look at this link Displaying Bitmaps Efficiently and try to download a sample on the left called BitmapFun.zip
In my apps i want to display images and text in three ways
ListView
GridView
FullScreen
i have 500+ images and text that i parse using JSON and store into SQLite.
I know how to create ListView & GridView but problem is I don't know how to create the custom layout.
I have image but due to my low reputation i am not able to post image.
I try to explain what i need.
I need custom fullscreen layout that has 2 buttons, one on the left and other on the right and between those 2 buttons I need Imageview that display the fullscreen image.
thanks in advance
Use UniversalImageLoader library, as it has all the modes you need. It also supports caching and lazy load, which you will definitely need on 500 images.
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?