Giter Site home page Giter Site logo

motiontoast-easiotic's Introduction

MotionToast-Easiotic

Java version of MotionToast ๐Ÿ”ฅ

This is the first Java version of MotionToast by Lazy-pr0grammer.

Don't forget to check Spikeysanju's library also: Spikeysanju's MotionToast

platform GitHub license GitHub stars GitHub forks Repo size GitHub follow

A beautiful Toast library in Android Java โ™จ๏ธ

GitHub Cards Preview

Types of toast style ๐Ÿ˜‹

  • Light MotionToasts: Light MotionToasts

  • Dark MotionToasts: Dark MotionToasts

What's New ๐Ÿ‘ป

  1. Added round corner support for Light full color toasts.
  2. Made it more easy for everyone.
  3. Removed old fonts and added new fonts.
  4. Now the library is more easy-to-use.

How to use? ๐Ÿค”

Step 1: Add the JitPack repository to your build file

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

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

Add dependency in your app module

dependencies {
  implementation 'com.github.lazy-pr0grammer:MotionToast-Easiotic:1.2' 
}

Five types of Toast ๐Ÿ–๐Ÿป

1. MotionStyle.SUCCESS

2. MotionStyle.WARNING

3. MotionStyle.ERROR

4. MotionStyle.INFO

5. MotionStyle.DELETE

Toast duration โณ

1. MotionStyle.LENGTH_SHORT //3 seconds

2. MotionStyle.LENGTH_LONG //4 seconds

Toast modes ๐Ÿธ

1. MotionStyle.LIGHT

2. MotionStyle.DARK

Toast gravity ๐Ÿš€

1. MotionStyle.TOP

2. MotionStyle.CENTER

3. MotionStyle.BOTTOM

Color mode ๐ŸŒˆ

1. 0 //Zero is for full color Toast

2. 1 //One is for transparent color Toast

Sample codes for MotionToasts โ„

Full color Success MotionToast(Light)

MotionToast motionToast = new MotionToast(
        MainActivity.this,
        0,
        MotionStyle.LIGHT,
        MotionStyle.SUCCESS,
        MotionStyle.BOTTOM,
        "SUCCESS",
        "You got succeed :)",
        MotionStyle.LENGTH_SHORT
);

motionToast.show();

Transparent color Success MotionToast(Dark)

MotionToast motionToast = new MotionToast(
        MainActivity.this,
        1,
        MotionStyle.LIGHT,
        MotionStyle.SUCCESS,
        MotionStyle.BOTTOM,
        "SUCCESS",
        "You got succeed :)",
        MotionStyle.LENGTH_SHORT
);

motionToast.show();

Full color Success MotionToast(Dark)

MotionToast motionToast = new MotionToast(
        MainActivity.this,
        0,
        MotionStyle.DARK,
        MotionStyle.SUCCESS,
        MotionStyle.BOTTOM,
        "SUCCESS",
        "You got succeed :)",
        MotionStyle.LENGTH_SHORT
);

motionToast.show();

Transparent color Success MotionToast(Dark)

MotionToast motionToast = new MotionToast(
        MainActivity.this,
        1,
        MotionStyle.DARK,
        MotionStyle.SUCCESS,
        MotionStyle.BOTTOM,
        "SUCCESS",
        "You got succeed :)",
        MotionStyle.LENGTH_SHORT
);

motionToast.show();



Thank you for exploring MotionToast-Easiotic!
Happy coding! ๐Ÿš€

motiontoast-easiotic's People

Contributors

jumman04 avatar lazy-pr0grammer avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.