How to create an android image viewer - Part 7 creating custom ImageView

preview_player
Показать описание
This is part 7 of the android tutorial series about creating an android image viewer using the android local storage framework that was introduced in android lollipop.

For part 7 we will be creating our own custom ImageView. Which is basically our own class which extends from the android ImageView class.

And then we will load the bitmap into our new custom ImageView using the glide image loading library.

The reason for creating our own android custom ImageView class is for attaching listeners such as pinch zoom & scroll.

Github details:

The code can be found on github from the following instructions below

image-viewer-custom-imageview

or you can run this command

image-viewer-custom-imageview

In this tutorial we will cover:
- Creating a custom view class
- Adding a custom view class to a layout
- Using glide image loading library to load a bitmap into the custom ImageView

API's covered:
- ImageView
- findViewById

For much more information checkout

The previous tutorials were aimed at beginners to android but over time have been getting more complex as the original camera_intent app has developed.
This tutorial series is more aimed towards the intermediate developers thought for those who have been following the previous tutorial series, feel free to watch this android performance series.

Android studio (1.5) is the editor of choice (IDE) for this tutorial series.

This tutorial series is the start of what I expect to be many so I encourage comments and feedback to improve the quality and viewing experience.
Рекомендации по теме
Комментарии
Автор

Hi Nigel. Great series of tutorials! How do I use the back button to go back to my gallery, after opening the image in the separate imageview?

ahutgupta
Автор

Great job, keep it up! However videos should be a little longer then ~8 min, but that is my opinion. Take care !

kodobi
Автор

Hey Nigel. Hope you can help me in this part. How did you get that constructor pop up window to get the @override methods ( the last two constructors ) ? I need that keyboard shortcut. I'm still new using android studio.

devanhunt
Автор

when I pressed back button app is closed.How can I solve this?I wanna when I pressed back button back to main activity.

delhmela
Автор

sir you have sample of image recognition ?

NatsuDragneel-snfh
welcome to shbcf.ru