Skip to content
A much nicer toast structure and a customized sub-dialog
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea v1.0.1 Dec 21, 2016
Screenshots
ToastOX v1.0.1 Dec 21, 2016
app v1.0.0 Dec 21, 2016
gradle/wrapper
.gitignore
README.md Update README.md May 10, 2017
build.gradle
gradle.properties v1.0.0 Dec 21, 2016
gradlew v1.0.0 Dec 21, 2016
gradlew.bat
settings.gradle v1.0.0 Dec 21, 2016

README.md

ToastOX

Android Library

A much nicer toast structure and a customized sub-dialog.

How to include

Add the repository to your project build.gradle:

repositories {
	maven {
		url "https://jitpack.io"
	}
}

And add the library to your module build.gradle:

dependencies {
	compile 'com.github.10uroi:ToastOX:1.0.1'
}

Usage

ToastOX

ToastOX.ok(getApplicationContext(), "Hello World! - OK");
ToastOX.error(getApplicationContext(), "Hello World! - Error");
ToastOX.info(getApplicationContext(), "Hello World! - Info");
ToastOX.warning(getApplicationContext(), "Hello World! - Warning");
ToastOX.muted(getApplicationContext(), "Hello World! - Muted");
ToastOX.Tnull(getApplicationContext(), "Hello World! - Null");
ToastOX.ok(getApplicationContext(), "Hello World! - OK", Toast.LENGTH_SHORT, 20, 200, 200);
...


ToastOXDialog

      new ToastOXDialog.Build(this)
            .setTitle("Your Title")
            .setContent("You can write your message")
            .setPositiveText("Yes")
            .setPositiveBackgroundColorResource(R.color.orange)
            .setPositiveTextColorResource(R.color.black)
            .onPositive(new ToastOXDialog.ButtonCallback() {
                @Override
                public void onClick(@NonNull ToastOXDialog toastOXDialog) {
                    Log.i("Click","Yes");
                }
            })
            .setNegativeText("No")
            .setNegativeBackgroundColorResource(R.color.black)
            .setNegativeTextColorResource(R.color.orange)
            .onNegative(new ToastOXDialog.ButtonCallback(){
                @Override
                public void onClick(@NonNull ToastOXDialog toastOXDialog) {
                    Log.w("Click","No");
                }
            }).show();
You can’t perform that action at this time.