Skip to content

Custom Toast library. You can apply the customizations you want. It has a flexible structure

Notifications You must be signed in to change notification settings

FiratGURGUR/Thost

Repository files navigation

Thost

What can you do?

  • You can use existing mixed toast (Success, Error, Warning, Info thost)
  • You can change toast radius
  • You can change toast background color
  • You can change toast font
  • You can change toast text size
  • You can change toast text color
  • You can add icon to toast
  • You can change toast iconTint
  • You can change toast duration

Installation

Add this in your build.gradle file

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

Add this to your module's build.gradle file

dependencies {
	        implementation 'com.github.FiratGURGUR:Thost:1.0'
	}

Usage

1. MixedThost

1.1 Succes Toast:

MixedThost.success(MainActivity.this, "Success toast!").show();

1.2 Error Toast:

MixedThost.eror(MainActivity.this, "Error toast!").show();

1.3 Warning Toast:

MixedThost.warning(MainActivity.this, "Warning toast!").show();

1.4 Info Toast:

MixedThost.info(MainActivity.this, "Info toast!").show();

2. Custom Thost

With thost, you can set the toast message as you wish. You just need to specify the features you want to add

Base Custom Thost:

   new Thost()
            .setContext(MainActivity.this)
            .setTitle("Since it is clearly mentioned as 'impossible to lternative method and I clearly mentioned it as well.")
            .create().thost().show();

Thost Radius :

.setRadius(25)

Thost Color :

.setColor(getColor(R.color.colorAccent))

Thost Add icon :

.setIcon(R.drawable.icon)

Thost icon tint color :

.seticonTintColor(R.color.colorPrimary)

Thost Text color :

.setTextColor(R.color.colorPrimary)

Thost Text size :

.setTextSize(9)

Thost Text font :

.setFont(R.font.fontname)

Thost duration :

.setDuration(Toast.LENGTH_LONG)

Screenshots






About

Custom Toast library. You can apply the customizations you want. It has a flexible structure

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages