-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking for the java documentation of that library. #52
Comments
Same here! I'm really interested using this! |
Have you found a solution to use it ? I'm still looking for a way. |
Have you tried using this code? It works for me.
|
I tried your solution but it gives the following:
|
The problem lies with XML file of Main3Activity and style.xml. Please share the code for it. |
Below Main3Activity.xml
below the style.xml
Thanks. |
Both of the files are fine. I have given it a try, and it worked. Activity Code
XML
build.gradle
Add this in Android Manifest
|
It works now thanks too much. If you know a library to suggest me for image and video viewing, please tell me. Thanks alot for your help. |
You can use two different libraries for both purposes. For Image, you can use the current library (StFalconImageViewer). For Video, you can try using this one (https://github.com/fpauer/Full-Screen-Video-Android). Thank you. |
Hey I'm trying to implement grid image view using this library using java. Could you please suggest me on how to do it. I have used your sample code and I am able to bring multiple images in full screen mode. Now I want to have a images grid and on select of images grid, image should be displayed fullscreen |
You can create images grid using Recycler View, and in Recyclerview adapter you can add the listener on the image and can add the same code as above. |
Thanks for the suggestion. I have tried this already @amuizz20 . I couldn't load the exact image that was clicked. When I clicke on any image from the grid, it always load the first image in StfalconImageViewer and not the one that I clicked on I have to swipe left to navigate to find the image |
Please share the code here. I will help you to make it work. |
on the thumbnail onclick listener I am doing this I have a to display images from a folder in mobile. new StfalconImageViewer.Builder<>(context, files, (imageView, file1) -> { Edit : |
In this code you should pass complete Images array to StFalconImageViewer so, you can swipe left and right and also pass the position of the selected image.
This is how I did that. You can do the same with your mobile folder images. Activitycheck.java
activity_check.xml
recycler_layout.xml
image_viewholder.java
image_adapter.java
|
This is exactly what I want. Whenever I pass all files, it was always taking to the first image and I wasn't sure how to set position. I was missing the below part in my implementation. setCurrentPosition(position) Thanks a million |
But I have a mixed list of images and video. For user good experience, I want when user slide an image if the next file is a video, I want play that video in the same library viewer without closing the actual viewer and show the other viewer for video. I know it is possible because Facebook do it in its app. Do you understand me ? Thanks a million. |
You can make a custom library for this. You can detect whether the file is an image or video and then to view the photo or video, ImageView and VideoView will be used (Check Android Documentation). In the activity, make the visibility false for VideoView and display ImageView if it is an image, make the visibility false for ImageView and display VideoView if it is a Video. Using this you can achieve what you wanted. For Help, you can see the code for both of the libraries and can combine them for both purposes (video and photo). It would be a great idea to make a library like that for your own purpose like facebook did. |
@amuizz20 The thing that makes me fear the most is to have to create a library. I started android developpement at April 2020. I think even for experienced developper, making a library take at least several months. |
@amuizz20 The thing that makes me fear the most is to have to create a library. I started android developpement at April 2020. I think even for experienced developper, making a library take at least several months. I'm sad to know that no one thought to make something like that for android community. |
Disappointed that no one made the library that can do that. But it is not that difficult to make it, but it just takes time. You can make something like that after six months in android development. You can look at this Open Source Project. It is a gallery app. They implemented the same thing. Btw I have got an idea. If I have got enough time from my work, I want to make a try to make something like that, as you suggested. It would be helpful for the community. |
@amuizz20 Sorry to make you back here again. Is it possible ? I want to close the imageViewer when user double click on an image. I also want to save an image when user long press on it. Thanks ten millions. |
I made it to be used like:
|
I'm android learner and I'm using java.
What is the java version of that code ?:
new StfalconImageViewer.Builder<>(context, images, new ImageLoader<String>() { @Override public void loadImage(ImageView imageView, String imageUrl) { Glide.with(context).load(imageUrl).into(imageView) } }).show();
When using it in my java code, <> is red marked with message: Cannot infer arguments(unable to resolve constructor)
Thanks.
The text was updated successfully, but these errors were encountered: