Add it to your build.gradle with:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
and:
dependencies {
compile 'com.github.ceryle:RadioRealButton:v1.0'
}
Option Name | Format | Description |
---|---|---|
custom:rrb_image | integer |
Button's image icon |
custom:rrb_imageTint | color |
Tint for button's image icon |
custom:rrb_ripple | boolean |
Set it true for default ripple |
custom:rrb_rippleColor | color |
Ripple color |
custom:rrb_backgroundColor | color |
Background color, and it can be used with ripple |
custom:rrb_text | string |
Set button's text |
custom:rrb_textColor | color |
Change button's text color |
Option Name | Format | Description |
---|---|---|
custom:rrbg_radius | integer |
Set radius to make radio real button group rounder |
custom:rrbg_animateSelector | integer |
Set animation on bottom moving view |
custom:rrbg_animateImages_enter | integer |
Animate image when button clicked |
custom:rrbg_animateImages_exit | integer |
Animate image when other than selected button clicked |
custom:rrbg_animateTexts_enter | integer |
Acts same as image animation |
custom:rrbg_animateTexts_exit | integer |
Acts same as image animation |
custom:rrbg_bottomLineColor | color |
Set bottom line color |
custom:rrbg_bottomLineSize | dimension |
Set bottom line height |
custom:rrbg_selectorColor | color |
Set color of moving view |
custom:rrbg_selectorSize | dimension |
Set height of selecter |
custom:rrbg_selectorRadius | dimension |
Set selector radius to make it rounder |
custom:rrbg_selectorAboveOfBottomLine | boolean |
Set true if selector is desired above of bottom line |
custom:rrbg_shadow | boolean |
Set true for shadow |
custom:rrbg_shadowElevation | dimension |
Elevation value must be set for shadow |
custom:rrbg_shadowMargin | dimension |
Set margin to create space for shadow |
custom:rrbg_position | integer |
Set position to select button, starts from 0 |
custom:rrbg_dividerSize | dimension |
Set divider size for the line between buttons |
custom:rrbg_dividerRadius | dimension |
Set divider radius to make it rounder |
<co.ceryle.radiorealbutton.library.RadioRealButtonGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:rrbg_bottomLineSize="0dp"
app:rrbg_dividerColor="@color/black"
app:rrbg_dividerSize="1dp"
app:rrbg_selectorColor="@color/red_700"
app:rrbg_selectorSize="6dp"
app:rrbg_radius="10dp"
app:rrbg_shadow="true"
app:rrbg_shadowElevation="2dp"
app:rrbg_shadowMargin="3dp"
app:rrbg_animateTexts_enter="overshoot"
app:rrbg_animateImages_enter="overshoot">
<co.ceryle.radiorealbutton.library.RadioRealButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:rrb_image="@mipmap/ic_launcher"
app:rrb_imageHeight="36dp"
app:rrb_imageWidth="36dp"
app:rrb_ripple="true"
app:rrb_rippleColor="@color/black"
app:rrb_text="Button 1"
app:rrb_textColor="@color/black"/>
<co.ceryle.radiorealbutton.library.RadioRealButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:rrb_image="@mipmap/ic_launcher"
app:rrb_imageHeight="36dp"
app:rrb_imageWidth="36dp"
app:rrb_ripple="true"
app:rrb_rippleColor="@color/black"
app:rrb_text="Button 2"
app:rrb_textColor="@color/black"/>
</co.ceryle.radiorealbutton.library.RadioRealButtonGroup>
This project is licensed under the Apache License Version 2.0 - see the LICENSE.md file for details