GlowShapeDrawable - Custom drawable to do outer glow effects ✨

Overview

GlowShapeDrawable

💻 Setup

Add it in your root build.gradle at the end of repositories

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

Add the dependency

    dependencies {
	    implementation 'com.github.Vnicius:GlowShapeDrawable:1.0.0'
    }

⌨️ Usage

    val glowDrawable = GlowShapeDrawable()

    view.apply {
        setLayerType(View.LAYER_TYPE_SOFTWARE, glowDrawable.paint) // important
        background = glowDrawable
    }

🖌 Examples

  • Background color file
    <!--res/color/background.xml-->

    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:color="#ff0" android:state_selected="true" />
        <item android:color="#999" />
    </selector>
  • Glow color file
    <!--res/color/glow.xml-->

    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:color="#80ffff00" android:state_selected="true" />
        <item android:color="@android:color/transparent" />
    </selector>
  • Using this
    val backgroundDrawable = GlowShapeDrawable().apply {
            backgroundColorList =
                ContextCompat.getColorStateList(context, R.color.background)
            glow = Glow(
                ContextCompat.getColorStateList(context, R.color.glow),
                context.resources.getDimension(R.dimen.glow_size).toInt()
            )
            cornerRadius = context.resources.getDimension(R.dimen.corner_radius) // optional
        }
  • Or you can use with a single color
    val backgroundDrawable = GlowShapeDrawable().apply {
            backgroundColor = Color.GREEN
            glow = Glow(color = Color.RED,
                size = context.resources.getDimension(R.dimen.glow_size).toInt()
            )
        }

Based on GlowButton repository

You might also like...
Custom android music player view.
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. co.mobiwise.library.Intera

Android Library for Custom Switches.
Android Library for Custom Switches.

Android Library for Custom Switches.

Custom wheel widget for android
Custom wheel widget for android

Wheel widget for Android To include the wheel widget in the current layout, you should add in the layout xml this lines: it.sephiroth.android

Set custom font in Android application

MagicViews Provides a simple way to set custom font in Android application. Adding to your project Add the library as a dependency to your build.gradl

A beautiful Android custom View that works similar to a range or seekbar. With animations.
A beautiful Android custom View that works similar to a range or seekbar. With animations.

ValueBar A beautiful Android custom View that works similar to a range or seekbar. Selection by gesture. With animations. Supporting API level 11+. De

An android custom view that displays a circle with a colored arc given a mark
An android custom view that displays a circle with a colored arc given a mark

MarkView An android custom view that displays a circle with a colored arc given a mark. Usage Add as a dependency compile 'com.github.xiprox.markv

Custom UI control for android which is showing data as a segments and a value inside them.
Custom UI control for android which is showing data as a segments and a value inside them.

Segmented Bar View for Android Custom UI control for android which is showing data as a segments and a value inside them. Screenshots Install From rep

This is a android custom view , like a scratch card effect!
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.
An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.

#DotMatrixView This is an Android library project providing a custom view that can display things on a grid of dots. When the displayed value changes,

Releases(1.0.0)
Owner
Vinícius Veríssimo
Bacharel e Mestre em Ciência da Computação na UFPB e Mestre em Informática pela UFPB. Desenvolvedor Android na Fuze.cc.
Vinícius Veríssimo
A cool Open Source CoverFlow view for Android with several fancy effects.

FancyCoverFlow THIS PROJECT IS NO LONGER MAINTAINED! What is FancyCoverFlow? FancyCoverFlow is a flexible Android widget providing out of the box view

David Schreiber-Ranner 1.1k Nov 10, 2022
effects for android notifications

#NiftyNotification effects for android notifications.base on (Crouton) ScreenShot Usage NiftyNotificationView.build(this,msg, effect,R.id.mLyout)

李涛 1.1k Nov 10, 2022
Sliding cards with pretty gallery effects.

SlidingCard Sliding cards with pretty gallery effects. Download Include the following dependency in your build.gradle file. Gradle: repositories {

mxn 681 Sep 7, 2022
Parallax everywhere is a library with alternative android widgets with parallax effects.

Parallax Everywhere# Parallax everywhere (PEW) is a library with alternative android views using parallax effects. Demo You can try the demo app on go

fmSirvent 712 Nov 14, 2022
Draggable views with rotation and skew/scale effects

DraggableView Draggable views with rotation and skew/scale effects. Usage Implement DragController.IDragViewGroup Create instance of DragController Ov

Eugene Levenetc 562 Nov 11, 2022
Library for creating blur effects under Android UI elements

BlurTutorial Meet BlurTutorial, an Android-based library made by Cleveroad Hurry to check our newest library that helps to blur the background in Andr

Cleveroad 150 Dec 16, 2022
A Jetpack Compose library with blur, pixelate, and other effects to keep your designer happy. Inspired by iOS UIVisualEffectView.

A Jetpack Compose library with blur, pixelate, and other effects to keep your designer happy. Inspired by iOS UIVisualEffectView.

清茶 67 Dec 30, 2022
Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views

Decor Decor is a library that applies decorators to Android layout with additional attributes without the need to extend and create a custom View for

Mouna Cheikhna 304 Nov 25, 2022
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Vijay Vankhede 419 Sep 9, 2022
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.

BottomBar (Deprecated) I don't have time to maintain this anymore. I basically wrote the whole library in a rush, without tests, while being a serious

Iiro Krankka 8.4k Dec 29, 2022