How can I implement telegram app scaling ImageView effect?
telegram has rounded images for contacts. if I touch it in a amazing animation it gets scale and fill the screen. in animation transition image convert from circle to rectangle smoothly. I cannot find anyway to do this. I found libraries like shapedImageView but I have trouble with converting circle to rectangle smoothly.
my main challenge is the animation effect.
The source code of telegram is available on github, so you can check it and see, how they implemented that.
Maybe it is also possible to achieve this effect with material transition animations, if you want to open picture in another activity/fragment. Have a look at this library, for example: Material-Animations. I think you could try using shared elements.
Related
I am trying to create one rotate animation just similar to tick/cross animations where a moving tick gets converted into a cross and vice versa while rotating. The tick/cross animation is possible by using Vector graphics but how do i implement the same by using .png images on any imageview? I have gone through a lot of threads like https://www.geeksforgeeks.org/how-to-make-check-tick-and-cross-animations-in-android/
but not getting any relevant one, so please help me out.
Code I am using to rotate the imageview:
imageview.animate().rotation(360f).start()
Can I upload a picture (in a ImageView) and draw rectangles using the canvas in the same ImageView? all the examples I've seen so far used two. I wonder if you can use only one? if so, how?
If you are new to android.
Open android studio, .
File ->New->import Sample ,
search for image.
Choose basic render script, this will give you basics of image handling.
However for your usage, you can simply create a view with border and add imageview inside it.
I have created a app to find the hotels, I am using a slider to show all images related to the hotel's. But I want to get the first image after the last slide in circular fashion.
Get idea through below Picture, Because I want to achieve it in same way.
Sliding SlidingSlidingSliding
All image must be in circular fashion with no end point for image in gallery while sliding.
Please have a look at the below library called InfiniteScrollView.
I think this will do exactly what you are looking for.
https://github.com/satansly/InfiniteScrollView
I want to make a small part of the image glow whenever the activity is loaded. Do I need to take the exact coordinates of the image part?
I recommend using a GIF. It can be loaded as an image and won't require any changes in your code. A smallish tutorial can be found in this Youtube video.
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.