Simple Dialog Preview.
Add maven jitpack.io
and dependencies
in build.gradle (Project)
:
// build.gradle project
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
// build.gradle app/module
dependencies {
...
implementation 'com.github.gzeinnumer:DialogPreviewImage:version'
implementation 'com.github.gzeinnumer:EasyDialogFragment:last-vesion'
//check on https://github.com/gzeinnumer/EasyDialogFragment
implementation 'com.github.gzeinnumer:SimpleMaterialStyle:last-vesion'
//check on https://github.com/gzeinnumer/SimpleMaterialStyle
//required
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
}
Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
new DialogPreviewImage(getSupportFragmentManager()).setImage(bitmap).show();
Required permission to external/internal
String path = "YOUR_IMAGE_PATH";
new DialogPreviewImage(getSupportFragmentManager()).setImage(path).show();
new DialogPreviewImage(getSupportFragmentManager()).setImage(imageView).show();
String url = "https://avatars3.githubusercontent.com/u/45892408?s=460&u=94158c6479290600dcc39bc0a52c74e4971320fc&v=4";
new DialogPreviewImage(getSupportFragmentManager()).setImage(url).show();
new DialogPreviewImage(getSupportFragmentManager())
.setContent("ini content")
...
.show();
Preview :
Image Preview | Add Content Message |
MainActivity.java & activity_main.xml
- 1.0.0
- First Release
- 1.0.1
- Bug Fixing
- 1.0.2
- Bug Fixing
- 1.1.0
- From ImageView
- 1.1.1
- Bug Fixing
- 1.2.1
- Remove Zoom
- Add load from URL
- Bug Fixing
- 1.2.2
- Bug Fixing
You can sent your constibution to branch
open-pull
.
Fore More All My Library
Copyright 2021 M. Fadli Zein