Pierry/SimpleToast


Notifications for Android (like a Toast)

Download


Step 1. Add the JitPack repository to your build file

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

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.pierry:simpletoast:'
	}
	dependencies {
		implementation("com.github.pierry:simpletoast:")
	}
	<dependency>
	    <groupId>com.github.pierry</groupId>
	    <artifactId>simpletoast</artifactId>
	    <version></version>
	</dependency>

                            
    libraryDependencies += "com.github.pierry" % "simpletoast" % ""
        
        

                            
    :dependencies [[com.github.pierry/simpletoast ""]]
        
        

Readme


SimpleToast

Android Arsenal

Notifications for Android (like a Toast)

Current version: v1.9

Example

Default icons

alt tag alt tag alt tag

Font awesome

alt tag alt tag alt tag alt tag alt tag

Gradle

This library uses android-iconify:1.0.9.

Into your build.gradle:

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

dependencies {
  compile 'com.github.Pierry:SimpleToast:v1.7'
}

Ref. https://jitpack.io/#Pierry/SimpleToast/v1.7

Usage

The API is kept as simple as the Toast API:

Create a SimpleToast for any CharSequence with default icon:

SimpleToast.ok(Context, CharSequence);
SimpleToast.error(Context, CharSequence);
SimpleToast.info(Context, CharSequence);
SimpleToast.muted(Context, CharSequence);
SimpleToast.warning(Context, CharSequence);

Using Font Awesome:

SimpleToast.ok(Context, CharSequence, "{fa-home}");
SimpleToast.error(Context, CharSequence, "{fa-user}");
SimpleToast.info(Context, CharSequence, "{fa-check-square}");
SimpleToast.muted(Context, CharSequence, "{fa-github}");
SimpleToast.warning(Context, CharSequence, "{fa-exclamation-circle}");

Use this link for icons: http://fortawesome.github.io/Font-Awesome/icons/

Questions

Questions regarding SimpleToast can be asked on StackOverflow, using the simpletoast tag.

Credits

Joan Zapata creator of Android-Iconify

Dave Gandy creator of Font-Awesome

Developed By

Pierry Borges - http://pierry.github.io - pieerry@gmail.com

License

Apache Version 2.0