GithubHelp home page GithubHelp logo

eriffanani / toastyle Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 1.01 MB

Android library made for easily show your custom toast message.

License: Apache License 2.0

Java 100.00%
android android-library java message toast alert android-studio custom-toast customalert kotlin

toastyle's Introduction

Toastyle

Create a toast message quickly and customize it to what you want.

Installation

repositories

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

dependencies

implementation 'com.github.eriffanani:Toastyle:1.0.0'

How To Use

  • Basic
Toastyle.makeText(context, "Basic toast")

  • Text Color
Toastyle.Builder(context, "Toast text color")
    .textColor(R.color.purple_200)
    .show()

  • Use Icon
iconLeft(R.drawable.ic_error) / iconRight(R.drawable.ic_error)
iconColor(R.color.purple_200)

  • Font
fontFamily(R.font.montserrat)

  • Border
border(R.dimen.toast_border_size, R.color.purple_200)

  • Corner Radius
// All corners
cornerRadius(R.dimen.corner_toast_small) 
// Custom corner radius (Top Left, Top Right, Bottom Left, Bottom Right)
cornerRadius(R.dimen.corner_toast, 0, 0, R.dimen.corner_toast)

  • Background Color
backgroundColor(R.color.purple_200)

  • State
Toastyle.success(context, "Toast success message")

  • Position
position(Gravity.CENTER or Gravity.END)

Licence

Copyright 2022 Mukhammad Erif Fanani

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.

toastyle's People

Contributors

eriffanani avatar zwagames avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

zwagames

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.