Giter Club home page Giter Club logo

toastoregg's Introduction

ToastOrEgg

Artboard 1@4x

Prerequisites

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.fullpagedevelopers:ToastOrEgg:1.0'
    }

Usage

duration: 0 Long

duration: 1 short

original toast by changing the background

toastOrEgg( "Anjayyyyy", 1, R.color.design_default_color_primary_variant)

to toast all attributes

toastOrEgg( "Gokilllll", 0, R.color.black, R.color.white, R.drawable.ic_baseline_lock_24)

for toast do not use color

toastOrEgg( "Gokilllll", 0, null, null, R.drawable.ic_baseline_lock_24)

for toast does not use image

toastOrEgg( "Gokilllll", 0, R.color.black, R.color.white,null)

for fragments you can use an activity

 activity?.toastOrEgg("hahahah", 0, R.color.black, R.color.white, R.drawable.ic_baseline_check_24)

ScreenShoot

Screen Shot 2020-10-28 at 13 14 45

Screen Shot 2020-10-28 at 13 14 26

Screen Shot 2020-10-28 at 13 14 08

Screen Shot 2020-10-28 at 13 13 50

toastoregg's People

Contributors

fullpagedeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

toastoregg's Issues

Request: support Android 11 (R - API 31)

Sadly on Android R, you can't set a custom View for a Toast (when targeting API 31) :

https://developer.android.com/reference/android/widget/Toast#setView(android.view.View)
https://developer.android.com/reference/android/widget/Toast#getView()

Please offer something that mimics the standard Toast's look&feel, so that at least we could have it shown within the app, as a normal View.
Maybe something similar to what we have when we long press the action items on the toolbar:

dfu6CwFaPM.zip

Custom Toasts are useful anyway usually only when the user is inside the app...

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.