on my Activity i've got on each side (on the right/on the left) a constrain Layout (100dp width). Between those gridviews i have a Gridlayout. This grid i fill with the help of an adapter. Now it contains 32*52 squares which contain a black/white image. With buttons placed on the constrain layouts i change the colour of choosen squares. But if i try this on several devices, this way is not realy performant and quite laggy. Is der a better way to do this? How? I found something on Bitmaps and canverals.. would this be better? How should i use this? Can someone recommend a tutorial? Or what other ways of achieving this exists?
Thanks a lot!
As all we know, RecyclerView enhance flexibility and also improve smoothness. So you can use RecyclerView Or RecyclerView with CardView.
And instead of using Bitmaps I would recommend you to use Glide
Library to Show Images
You can use Glide library for display image.So just add it in
build.gradle(Module App)
compile 'com.github.bumptech.glide:glide:3.7.0'
to set Images
Glide.with(context).load(image_path).into(imageView);
Note: image_path can be string, int resource, file or anything else bcoz Glide can load everything
Following are the tutorial links for RecyclerView with cardview:
link1: http://www.androidhive.info/2016/01/android-working-with-recycler-view/
link2: http://www.androidhive.info/2016/05/android-working-with-card-view-and-recycler-view/
Related
I think that HTML might be a solution. But how can I achieve this:
with multiple screens sizes support?
I have found this library: FlowTextView
But it doesn't provide the way to put images inside text, like html does. And I also want to drag/resize image's inside text :D
Important to keep images on the same place on multipile devices.
So. What is the solution? Must I go ahead with custom View?
What can you recomend?
I'm trying to make circular layout, containing 4 square ImageViews. I need to set rounded border to the whole layout, so every ImageView must be rounded in one corner.
It must look like this: http://imgur.com/X6LFt5H
How can I do this?
I'm loading pictures from the network using Picasso library
You can use the solution provided in this answer
to create circular image view in picasso and for combining 4 images try using this solution
I solved my problem.
I am combining 4 bitmaps in one and set this bitmap as source in CircleImageView.
Example of combining bitmaps I found in this SO answer.
I think that can help you !
https://github.com/siyamed/android-shape-imageview.
It help you product imageview with all kinds of shape.
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.
Hey, I checked tons of tutorials and guides but somehow can't find it...
I need to include multiple images in my Android app. It's like an image viewer/slideshow.
Currently I switch between pictures from /drawable-mdpi dir simply with ImageView and adapter, using gestures to left/right. Works but nothing impresive :/
Basically I could use something like Android (2.1) gallery with some image show animation.
1st question: what's the best way to include many (50-100) fullscreen images in App?
2nd: is it possible to use ViewFlipper animations directly to images? or do i have to somehow populate Views?
1st question: what's the best way to include many (50-100) fullscreen images in App?
Any approach that only involves a couple of images being in memory at one time. Full-screen images are large; you will run out of RAM.
2nd: is it possible to use ViewFlipper animations directly to images? or do i have to somehow populate Views?
You would have to use ImageViews as the children of the ViewFlipper.
I would recommend sticking with what you have and just apply animations.