pkjvit / Cue

Library to create fully customizable Bootstrap styled alerts

Home Page:https://github.com/akshay2211/Cue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cue

Library to create fully customizable Bootstrap styled alerts

Android Arsenal API

Demo

Usage

Add in app build.gradle

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

Basic usage

        Cue.init()
                .with(MainActivity.this)
                .setMessage("This is a sample Toast - Check it out")
                .setType(Type.PRIMARY)
                .show();

Types can be

    PRIMARY, SUCCESS, SECONDARY, DANGER, WARNING, INFO, LIGHT, DARK, CUSTOM

Custom usage

        Cue.init()
                .with(MainActivity.this)
                .setMessage("This is a sample Toast - Check it out")
                .setGravity(Gravity.CENTER_VERTICAL | Gravity.BOTTOM)
                .setType(Type.CUSTOM)
                .setDuration(Duration.LONG)
                .setBorderWidth(5)
                .setCornerRadius(10)
                .setCustomFontColor(Color.parseColor("#fd79a8"),
                        Color.parseColor("#ffffff"),
                        Color.parseColor("#e84393"))
                .setFontFace("fonts/custom_font.ttf")
                .setPadding(30)
                .setTextSize(20)
                .setTextGravity(Gravity.CENTER)
                .setHideToast(true)
                .show();

Download

Download or grab via Gradle:

        compile 'com.fxn769:cue:1.1'

or Maven:

        <dependency>
          <groupId>com.fxn769</groupId>
          <artifactId>cue</artifactId>
          <version>1.1</version>
          <type>pom</type>
        </dependency>

or ivy:

        <dependency org='com.fxn769' name='cue' rev='1.1'>
          <artifact name='cue' ext='pom' ></artifact>
        </dependency>

Snapshots of the development version are available in Sonatype's snapshots repository.

License

Licensed under the Apache License, Version 2.0, click here for the full license.

Author & support

This project was created by Akshay Sharma.

If you appreciate my work, consider buying me a cup of ☕ to keep me recharged 🤘 by PayPal

I love using my work and I'm available for contract work. Freelancing helps to maintain and keep my open source projects up to date!

forthebadge

About

Library to create fully customizable Bootstrap styled alerts

https://github.com/akshay2211/Cue

License:Apache License 2.0


Languages

Language:Java 100.0%