Coder Social home page Coder Social logo

designertoast's Introduction

DesignerToast 🤩❤️🔥

Android Arsenal platform API 0.1.3

Prerequisites

Add this in your root build.gradle file (not your module build.gradle file):

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

Dependency

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	 implementation 'com.github.vedraj360:DesignerToast:0.1.3'
}

Usage

To display an default Toast:

DesignerToast.defaultToast("yourContext","Default Toast",Gravity.CENTER,Toast.LENGTH_SHORT);

To display a success Toast:

DesignerToast.Success("yourContext", "Success Toast", Gravity.CENTER, Toast.LENGTH_SHORT);

To display the error Toast:

DesignerToast.Error("yourContext", "Error Toast", Gravity.CENTER, Toast.LENGTH_SHORT);

To display a warning Toast:

DesignerToast.Warning("yourContext","Warning Toast",Gravity.CENTER,Toast.LENGTH_SHORT);

To display an info Toast:

DesignerToast.Info("yourContext", "Info Toast", Gravity.CENTER, Toast.LENGTH_SHORT);

Custom Toast 🔥❤️🔥

To display the custom Toast:

Prameters Required -> Context, Message, Gravity, Toast Length, Custom Background, Text Size, Text Color, Toast Image,Layout Width, Layout Height.

DesignerToast.Custom(this,"Custom Toast",Gravity.CENTER,Toast.LENGTH_SHORT,
R.drawable.my_custom_shape,20,"#FFFFFF",R.drawable.ic_person, 200, 200);

Screenshots 🔥❤️🔥

Please click the image below to enlarge.

Dark Theme Toast

Just write DesignerToast.STYLE_DARK in parameter

Usage

To display a success Toast:

DesignerToast.Success("yourContext", "Success",, "Hello this is demo success!",Gravity.CENTER, Toast.LENGTH_SHORT,DesignerToast.STYLE_DARK);

To display the error Toast:

DesignerToast.Error("yourContext", "Error",, "Hello this is demo error!",Gravity.CENTER, Toast.LENGTH_SHORT,DesignerToast.STYLE_DARK);

To display a warning Toast:

DesignerToast.Warning("yourContext", "Warning",, "Hello this is demo warning!",Gravity.CENTER, Toast.LENGTH_SHORT,DesignerToast.STYLE_DARK);

To display an info Toast:

DesignerToast.Info("yourContext", "Info",, "Hello this is demo info!",Gravity.CENTER, Toast.LENGTH_SHORT,DesignerToast.STYLE_DARK);

Dark Theme Screenshots

Contributing

Please fork this repository and contribute back. Any contributions, large or small, major features, bug fixes, are welcomed and appreciated but will be thoroughly reviewed .

License

Copyright 2022 Vedraj360

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

designertoast's People

Contributors

dev-aniketj avatar innovativesapp avatar vedraj360 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.