TouchImageView | Adds touch functionality to Android ImageView
kandi X-RAY | TouchImageView Summary
kandi X-RAY | TouchImageView Summary
Adds touch functionality to Android ImageView.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TouchImageView
TouchImageView Key Features
TouchImageView Examples and Code Snippets
Community Discussions
Trending Discussions on TouchImageView
QUESTION
I am trying to make a slider between TouchImageView
and PlayerView
(Exoplayer
) but I am unable to catch up with certain issues that are persisting even after several changes. All the suggestions and answers are welcome. Pardon my questioning skills and please let me know if more inputs are needed for your analysis. Kindly also let me know if there is any other alternative to successfully meet my expectations of properly implementing views smoothly in ViewPager
.
Problem description:-
Issues related to click on view :-
- When the image is clicked, the audio of next video (if any) starts playing in background.
- The same issue is with
PlayerView
. When the video thumbnail is clicked, the audio of clicked video as well as next video plays together.
Issues related to slider :-
- When an we slide and reach to an image preceding to a video, the audio starts playing in background. However, after sliding once toward video and sliding again in forward or backward direction from video for once, the audio stops. But this issue persists after viewing more than one images in forward or backward direction of video.
Attempts made by me to solve this issue :-
- I tried to use
playerView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {...})
method inPagerAdapter
to handle player states while sliding between views. Unfortunately, I was unable to grasp to use different player states. - I also tried to use
viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {...}
method inStatusViewer
class.
StatusViewer
Java class (Setting PagerAdapter
class object inViewPager
) :-
ANSWER
Answered 2021-Nov-20 at 07:26Thank you StackOverflow community for viewing this question. I resolved the above issue by below mentioned modifications :-
- Changes in ImageSliderAdapter (
PagerAdapter
) :-
-> Below mentioned code was added in onViewAttachedToWindow(View v)
:-
QUESTION
I have currently implemented a custom class that implements AppCompatImageView, OnGestureListener, and OnDoubleTapListener to build my own ImageView that has pinch to zoom, Double to Zoom in/out with the help of this article https://daveson.medium.com/android-imageview-double-tap-and-pinch-zoom-with-multi-touch-gestures-in-kotlin-1559a5dd4a69
What I am missing here is that when the user double taps on the corner of the image then the image is Zoomed towards the center of the image by default. How do I ensure the double-tap takes the tap coordinates into consideration to zoom towards that coordinate.
Here is my TouchImageView class
...ANSWER
Answered 2021-May-10 at 05:40Did you tried https://github.com/MikeOrtiz/TouchImageView I could imagine that it has all your required features and it's well maintained
QUESTION
ANSWER
Answered 2020-Dec-08 at 16:24The easiest solution would be to wrap the ImageView in the FrameLayout
Like that:
QUESTION
When I switch to Android Studio 4.1 with this changes https://github.com/MikeOrtiz/TouchImageView/pull/267/files
...ANSWER
Answered 2020-Jun-04 at 14:16Same issue for me. It seems like Gradle issue (maybe should open a bug report)
I am able to temporary solve it by downgrade Gradle version to 6.5-milestone-1
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TouchImageView
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page