Friday, May 9, 2025
Alternative Way
  • Home
  • Latest
    • Latest
  • News
  • World Tech
  • World Gaming
  • Minecraft
  • Guides
  • Contact Us
  • About The Team
    • Privacy Policy
    • Terms of Use
No Result
View All Result
  • Home
  • Latest
    • Latest
  • News
  • World Tech
  • World Gaming
  • Minecraft
  • Guides
  • Contact Us
  • About The Team
    • Privacy Policy
    • Terms of Use
No Result
View All Result
Alternative Way
No Result
View All Result

A material design Toast Library for Android

Gordon James by Gordon James
October 3, 2021
in World Tech Code
0 0
0
Home World Tech Code

Toast doesn’t have to be complicated. With the release of Android Studio 3.0, Android developers no longer need to rely on third-party libraries to create a well-designed toast. The Toast library from the Android Support library is a robust and easy-to-use library that can give your app a unique, material design look and feel.

I have been wanting to write a Toast library for Android for a long time, and although the time has come there are still some things I don’t know. I still don’t know which widgets are the most important when it comes to displaying Toast messages with material design. I don’t know the correct way to implement the Android design guidelines. This is something only I can do. This is why I’ve created the Toast library for Android.

Table of Contents

Toggle
  • CuteToast
  • Target
  • What’s new
  • Screenshots
  • Requirements
  • Dependencies
  • Use
    • If no symbols are required:
      • Replace true with false at the end of the statement.
      • Or just remove the last boolean part
    • If you want to use custom symbols:
  • GitHub
      • Related Tags:

CuteToast

Toast library with material design for Android

Target

CuteToast is a custom toast library for Android that can be used instead of the default toast. It does everything toast does, but with a few extra spices. CuteToast allows developers to use toast with colorful designs and icons. It is open source and can be used for free. Give it a try!

What’s new

  • Added CuteToast without the pre-release icons. Check the dependencies.

More changes on the Release tab.

Screenshots

Click here to see it in high quality A material design Toast Library for Android

Requirements

Add this to your build.gradle root file (not to your build.gradle module): all projects { repositories { … maven { url https://jitpack.io } } }

Dependencies

Add this to your module’s build.gradle file (make sure the version matches the JitPack icon above): Dependencies { … Implementation ‘com.github.ahmmedrejowan.CuteToast:CuteToast:1.2’ } If you want to use only custom background options (no pre-made icons), then : Dependencies { … Implementation ‘com.github.ahmmedrejowan.CuteToast:CuteToast-Custom:1.2’. }

Use

Each of the following methods returns a toast. Don’t forget to call .show() To display the information toast : CuteToast.ct(this, This is an info toast, CuteToast.LENGTH_SHORT, CuteToast.INFO, true).show() ; To display a warning message : CuteToast.ct(this, This is a warning toast, CuteToast.LENGTH_SHORT, CuteToast.WARN, true).show() ; To display an error toast : CuteToast.ct(this, This is an error toast, CuteToast.LENGTH_SHORT, CuteToast.ERROR, true).show() ; This is how we toast to success: CuteToast.ct(this, This is a success toast, CuteToast.LENGTH_SHORT, CuteToast.SUCCESS, true).show() ; To watch Happy Toast: CuteToast.ct(this, This is a happy toast, CuteToast.LENGTH_SHORT, CuteToast.HAPPY, true).show() ; Post sad toasts: CuteToast.ct(this, This is a sad toast, CuteToast.LENGTH_SHORT, CuteToast.SAD, true).show() ; To display Toast Confused: CuteToast.ct(this, This is a confusion toast, CuteToast.LENGTH_SHORT, CuteToast.CONFUSE, true).show() ; To view the toast Delete : CuteToast.ct(this, This is a delete toast, CuteToast.LENGTH_SHORT, CuteToast.DELETE, true).show() ; To display Toast Save: CuteToast.ct(this, This is a Save Toast, CuteToast.LENGTH_SHORT, CuteToast.SAVE, true).show() ; To display a normal toast : CuteToast.ct(this, This is a normal toast, CuteToast.LENGTH_SHORT, CuteToast.NORMAL, true).show() ;

If no symbols are required:

Replace true with false at the end of the statement.

CuteToast.ct(this, This is an info toast, CuteToast.LENGTH_SHORT, CuteToast.INFO, false).show() ; CuteToast.ct(this, This is an error toast, CuteToast.LENGTH_SHORT, CuteToast.ERROR, false).show() ; and the same for the other guys.

Or just remove the last boolean part

CuteToast.ct(this, This is an info toast, CuteToast.LENGTH_SHORT, CuteToast.INFO).show() ; CuteToast.ct(this, This is an error toast, CuteToast.LENGTH_SHORT, CuteToast.ERROR).show() ;

If you want to use custom symbols:

CuteToast.ct(this, This is an info toast with custom star icon, CuteToast.LENGTH_SHORT, CuteToast.INFO, R.drawable.ic_star).show() ; CuteToast.ct(this, This is an error toast with custom danger icon, CuteToast.LENGTH_SHORT, CuteToast.ERROR, R.drawable.danger_ic).show() ;

GitHub

https://github.com/ahmmedrejowan/CuteToast

Related Tags:

animated toast android githubandroid snackbarmaterial design snackbarandroid snackbar custom layoutandroid snackbar vs toastandroid-snackbar position,People also search for,Privacy settings,How Search works,animated toast android github,android snackbar,material design snackbar,android snackbar custom layout,android snackbar vs toast,android-snackbar position,android snackbar style,material snackbar android

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
ShareTweet
Gordon James

Gordon James

Next Post

23 Best Google Sheets Add-Ons To Boost Productivity

  • Trending
  • Comments
  • Latest
How To Get Free Internet On Android Without Service

How To Get Free Internet On Android Without Service

March 10, 2022
🥇 +4 Neo Geo Emulators for Android  List ▷ 2021

🥇 +4 Neo Geo Emulators for Android  List ▷ 2021

October 3, 2021

Fix: Notifications not working on Nova Launcher

October 3, 2021
How to Fix OpenVPN Connected but Not Changing IP Address

How to Fix OpenVPN Connected but Not Changing IP Address

October 3, 2021

Setting Up Directory Sync Between On-Premises Active Directory with Microsoft 365 Azure AD

0
🥇 DELETE ACCOUNT from PS4  ▷ Step by Step Guide ▷ 2020

🥇 DELETE ACCOUNT from PS4  ▷ Step by Step Guide ▷ 2020

0
🥇 PPTX File Extension  What is .Pptx and how to open them? ▷ 2020

🥇 PPTX File Extension  What is .Pptx and how to open them? ▷ 2020

0
🥇 Make a Crossword in Microsoft Word  Step by Step Guide ▷ 2020

🥇 Make a Crossword in Microsoft Word  Step by Step Guide ▷ 2020

0
What to Know About Car Shipping Services

What to Know About Car Shipping Services

May 7, 2025
CS2 Skins-Why Trade Them?

CS2 Skins-Why Trade Them?

May 7, 2025
Alternative Routes: Successfully Exiting Your Wyndham Timeshare Without The Stress

Alternative Routes: Successfully Exiting Your Wyndham Timeshare Without The Stress

May 6, 2025
The Ultimate Seiko Watch Gift Guide

The Ultimate Seiko Watch Gift Guide

May 1, 2025

There's always an alternative Way!
Find us at 4145 Zolynthian Street, Vylorthos, QP 78425
No Result
View All Result
  • Home
  • Latest
    • Latest
  • News
  • World Tech
  • World Gaming
  • Minecraft
  • Guides
  • Contact Us
  • About The Team
    • Privacy Policy
    • Terms of Use

© 2022 - Alternative Way

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT
No Result
View All Result
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • Travel News

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.