/FSBubbleIndicator

Badge notification bubble indicator

Primary LanguageKotlinMIT LicenseMIT

FSBubbleIndicator

License Version

Requirements

  • minAndroidSdk: 16

Installation

Add to your gradle.build:

allprojects {
  	repositories {
  		...
  		maven { url 'https://jitpack.io' }
  	}
  }
dependencies {
          compile 'com.github.danielceinos:FSBubbleIndicator:1.0.1'
  }

Use

Options

	<declare-styleable name="FSBubbleIndicator">
    	<attr format="dimension" name="textSize" />
    	<attr format="color" name="bubbleColor" />
    	<attr format="color" name="textColor" />
    	<attr format="integer" name="count" />
    	<attr format="color" name="shadowColor" />
  	</declare-styleable>

  	<declare-styleable name="FSIconBubble">
    	<attr format="reference" name="icon" />
  	</declare-styleable>

Example

  <com.fireshield.library.FSBubbleIndicator
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:count="55555555"
        app:bubbleColor="#3c3eed"
        app:textSize="34sp"
        />
 <com.fireshield.library.FSIconBubble
        android:layout_width="48dp"
        android:layout_height="48dp"
        app:textSize="8sp"
        app:count="5"
        app:bubbleColor="#ba68c8"
        app:icon="@drawable/ic_favorite_border"
        />
	findViewById<FSBubbleIndicator>(R.id.bubble).count = 777