Skip to content

bilginenes/ebdialogutilities

Repository files navigation

EB Dialog Utilities

EB Dialog is a Pop-up Dailog library that offers solutions for general Info, Error, Confirm cases.

Active use in Memories: Dark Gallery

https://play.google.com/store/apps/details?id=com.enesbilgin.memories

Import Gradle

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the dependency:

dependencies {
    implementation 'com.github.bilginenes:ebdialogutilities:0.1.1'
}

How To Use

Information Dialog

EBDialogUtilities.showInfoBox(MainActivity.this,"This is an information message.");

Error Dialog

EBDialogUtilities.showErrorBox(MainActivity.this,"This is a error message.");

Confirmation Dialog

EBDialogUtilities.showConfirmBox(MainActivity.this, "Confirm Process", "Do you want to proceed the operation?",
   new CompletionListener() {
       @Override
       public void onSuccess() {
   	Toast.makeText(MainActivity.this,"onSuccess", Toast.LENGTH_SHORT).show();
       }

       @Override
       public void onCancel() {
   	Toast.makeText(MainActivity.this,"onCancel", Toast.LENGTH_SHORT).show();
       }
   });

Google Play Vote Dialog

EBDialogUtilities.showVoteBox(MainActivity.this, getString(R.string.app_name), new VoteChoiceListener() {
   @Override
   public void onRedirect() {
   	//Redirect your user to google play here.
   redirectToGooglePlay();
   Toast.makeText(MainActivity.this,"onRedirect", Toast.LENGTH_SHORT).show();
   }

   @Override
   public void onCancel() {
   Toast.makeText(MainActivity.this,"onCancel", Toast.LENGTH_SHORT).show();
   }

   @Override
   public void onLater() {
   Toast.makeText(MainActivity.this,"onLater", Toast.LENGTH_SHORT).show();
   }
});

Bugs/Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on Github and I'll look into it.

License

This library is under MIT License.