Skip to content

Repository files navigation

DialogPreviewImage


Simple Dialog Preview.


Content List


Download

Add maven jitpack.io and dependencies in build.gradle (Project) :

// build.gradle projectallprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
// build.gradle app/moduledependencies {
...
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'
}

Feature List


Tech stack and 3rd library


Usage

Image From Bitmap

Bitmapbitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
newDialogPreviewImage(getSupportFragmentManager()).setImage(bitmap).show();

Image From Path/File Image

Required permission to external/internal

Stringpath = "YOUR_IMAGE_PATH";
newDialogPreviewImage(getSupportFragmentManager()).setImage(path).show();

Image From ImageView

newDialogPreviewImage(getSupportFragmentManager()).setImage(imageView).show();

Image From Internet

Stringurl = "https://avatars3.githubusercontent.com/u/45892408?s=460&u=94158c6479290600dcc39bc0a52c74e4971320fc&v=4";
newDialogPreviewImage(getSupportFragmentManager()).setImage(url).show();

Add Content Message

newDialogPreviewImage(getSupportFragmentManager())
.setContent("ini content")
...
.show();

Preview :

Image PreviewAdd Content Message

Example Code/App

MainActivity.java & activity_main.xml

Sample Code And App


Version

  • 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

Contribution

You can sent your constibution to branchopen-pull.

Fore More All My Library


Copyright 2021 M. Fadli Zein

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages