AndroidRibbon
A library that lets you implement ribbon ui and shimmer animation easily.
Download
Gradle
And add a dependency code to your module's build.gradle
file.
Usage
Add following XML namespace inside your XML layout file.
RibbonView in layout
create using Builder
This is how to create RibbonView
's instance using RibbonView.Builder
class.
create using kotlin dsl
This is how to create RibbonView
's instance using kotlin dsl.
ShimmerRibbonView
ShimmerRibbonView lets you implement shimmer animation easily.
ShimmerRibbonView in layout
create using Builder
This is how to create ShimmerRibbonView
's instance using ShimmerRibbonView.Builder
class.
create using kotlin dsl
This is how to create ShimmerRibbonView
's instance using kotlin dsl.
Shimmer
This library using shimmer-android by Facebook.
Here are the detail shimmer-instruction about shimmer or you can reference below examples.
create using Builder
This is how to create Shimmer
's instance using Shimmer.Builder
class.
create using kotlin dsl
This is how to create Shimmer
's instance using kotlin dsl.
RibbonLayout
RibbonLayout lets RibbonViews overlap with other child views.
RibbonLayout in layout
And should set ribbonHeader
or ribbonBottom
using RibbonView
or ShimmerRibbonView
instance.
RibbonRecyclerView
RibbonRecyclerView lets you implement RecyclerView has RibbonView
items easily.
RibbonRecyclerView in layout
Add or remove RibbonView
items.
RibbonView Attributes
Attributes | Type | Default | Description |
---|---|---|---|
ribbonBackgroundColor | Color | #e254ff | sets ribbon background using color. |
ribbonRadius | Float | 10f | sets ribbon corner's radius. It's only active using with ribbonBackgroundColor . |
ribbonDrawable | Drawable | null | sets ribbon background using drawable. ribbonBackgroundColor and ribbonRadius will be ignored. |
ribbonRotation | Int | 0 | sets ribbon rotation. Only between 1 to 90 or -90 to -1 degree. |
paddingLeft | Float | 8f | sets left padding of the text. |
paddingTop | Float | 4f | sets top padding of the text. |
paddingRight | Float | 8f | sets right padding of the text. |
paddingBottom | Float | 4f | sets bottom padding of the text. |
text | String | "" | sets text. It is same as android:text attribute. |
textColor | Color | Color.WHITE | sets text color. It is same as android:textColor attribute. |
textSize | Float | 12f | sets text size. It is same as android:textSize attribute. |
textStyle | Int | Typeface.NORMAL | sets text style. It is same as android:textStyle attribute. |