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.
Related
I am familiar with fitcenter and centercrop in glide. But is it possible to make something like this image
Any ideas to achieve it?
Use two imageViews. One smaller and above the other. Then use this library and use this piece of code for the background image
Glide.with(this).load(R.drawable.demo)
.apply(bitmapTransform(new BlurTransformation(25)))
.into((ImageView) findViewById(R.id.image));
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/
I would like to build a custom component (extending from ImageView I guess) that display an image inside a frame specified by the user (the frame is a custom image) with inner rounded corners (Pinterest user icon like).
I started finding how to compose two bitmaps but it is a difficult matter so I am wondering if there is some opensource component/tutorial to better understand how to achive it.
The frame picture is a nine-patch png (I didn't understand how to load and scale it properly into a bitmap).
Thanks
Have you checked out this
Seems like it does the job, although I'm not sure how to implement.
I want to align images one over another ie like collage. The images are from Gridview.The image should overlap one over other.plz any one help me to solve this.When clicking those images it should expand .. pls provide me some source code to solve this or provide some similar example
Thanks in advance...
Have u ever thought to use 9-patch image.On the click of the image u can just give the Patch Scale.And to overlap image over an image its better to use FrameLayout rather than The GridView.
I have a small project in which i download images from internet in the form of drawable and use them in Imageview for which i have provided functionality similar to an Imagebutton but without the gray edges.
The question is that is there any functionality in Android(similar to iphone) by which we can crop the drawable from edges to make them rounded edged drawable...
Even if its a "not-tested-neither-recommended" method, do let me know... i would like to work on this a bit... thanx in advance folks...
I believe this is probably the link you're looking for: How should I give images rounded corners in Android?
I tried doing it with a drawable and nested and elements, but wasn't able to get the image drawable to show properly. Not sure if there's a way to get this working or not.