I have two questions, each similar to each other.
Firstly, my app loads images from my web server. When a user clicks the image, I need it to open the image in some sort of image viewer (where you can zoom into the image and pan around). Can I also load galleries/albums of images?
I'm currently using the Glide library to load the images into the ImageView
, but how can I implement the image viewer when the user clicks the ImageView
?
Also, is it possible to load a smaller (thumbnail) image into the ImageView
using Glide, but open the full-sized image when the user clicks on it and opens it in the image viewer?
Here is my ImageView
:
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
/>
Here is how I load the image into the ImageView
using Glide:
Glide.with(context)
.load("http://www.website.com/test.png")
.fitCenter()
.into(holder.imageView);
Secondly, my app has links to external websites that the user is able to click on. How can I open these links within the app, rather than opening it in a browser? Is there a library for this?