SegmentedController is an Android UI library for using customizable RadioGroup with RadioButtons.

Overview

SegmentedController

SegmentedController is an Android UI library for using customizable RadioGroup with RadioButtons.

Installation

Step 1: Add the JitPack repository to your build.gradle(Project: x) file

allprojects {
    repositories {
        ...

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

Step 2: Add the dependency to your build.gradle(Module: x) file

dependencies {
    ...
    //SegmentedController
    implementation 'com.github.erayozenc:SegmentedController:1.0.0'

}

Usage

">
<com.erayozenc.lib.SegmentController
        android:id="@+id/segmentedController"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:tab_cornerRadius="22dp"
        app:tab_selectedColor="@color/white"
        app:tab_unselectedColor="@color/light_grey"
        app:tab_strokeWidth="4dp">

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="First"/>

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Second"/>

    com.erayozenc.lib.SegmentController>

Attributes

">
<attr name="tab_strokeWidth" format="dimension"/>
<attr name="tab_cornerRadius" format="dimension"/>
<attr name="tab_selectedColor" format="color"/>
<attr name="tab_unselectedColor" format="color"/>

You can also customize your SegmentedController programmatically.

val segmentedController = findViewById<SegmentController>(R.id.segmentedController)

segmentedController.setSelectedTabColor(Color.WHITE)
segmentedController.setUnselectedTabColor(Color.GRAY)
segmentedController.setCornerRadius(22f)
segmentedController.setStrokeWidth(4f)

NOTE:

Default values for attributes

tab_strokeWidth = 2dp
tab_cornerRadius = 4dp
tab_selectedColor = Color.WHITE
tab_unselectedColor = Color.LTGRAY

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

You might also like...
Button for android with animations for transition and error states.
Button for android with animations for transition and error states.

Transition Button Android Preview Expand animation: Shake animation: Installation Gradle dependencies { implementation 'com.royrodriguez:transitionbu

AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard switch component.
AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard switch component.

AwesomeSwitch AwesomeSwitch is a replacement for the standard Switch(View) android offers, and it offers much more customization than the standard swi

[] Android floating action button
[] Android floating action button

DEPRECATED Use the FloatingActionButton from the support library instead. FloatingActionButton Description Android floating action button which reacts

Floating Action Button for Android based on Material Design specification
Floating Action Button for Android based on Material Design specification

FloatingActionButton Yet another library for drawing Material Design promoted actions. Features Support for normal 56dp and mini 40dp buttons. Customi

Bootstrap style widgets for Android, with Glyph Icons
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

ToggleButton Widget For Android Dev
ToggleButton Widget For Android Dev

ToggleButton ToggleButton Widget For Android Developers @Deprecated !!!项目已经停止维护,新项目移至https://github.com/zcweng/SwitchButton !!! How To Use xml

Icons, Borders, Radius ... for Android buttons
Icons, Borders, Radius ... for Android buttons

⚠️ This library was made years ago when it wasn't that easy to customize Android buttons like today. I highly recommend you to use Material Design but

Android Floating ActionButton with a progress indicator ring
Android Floating ActionButton with a progress indicator ring

FabProgress Android Circular floating action button with intergrated progress indicator ring As per material design docs Demo: Demo apk HOW TO ADD TO

👏 The Medium's Clapping Effect developed in Android
👏 The Medium's Clapping Effect developed in Android

👏 MediumClap-Android Built with ❤︎ by Wajahat Karim and contributors A Custom Floating Action Button (FAB) library like clapping effect on Medium 📄

Releases(1.0.0)
Owner
null
[] An Android library for an expandable button menu

ExpandableButtonMenu ExpandableButtonMenu is an Android library which implements an expandable button that can be used as a substitute of a fixed size

Lemon Labs 325 Nov 14, 2022
Android library providing an implementation of the Material Design Floating Action Button Speed Dial.

Android library providing an implementation of the Material Design Floating Action Button Speed Dial.

Sanyam Mehta 6 Dec 24, 2022
Primitive OpenGL (ES) based graphics library and engine for Android development.

Parrot Primitive OpenGL (ES) based graphics library and engine for Android development. Parrot makes Android core graphics simpler, giving you the fea

null 1 Dec 30, 2021
SquircleView is a library which provides you with Squircle views to use for buttons, views, etc.

SquircleView is a library which provides you with Squircle views to use for buttons, views, etc.

Juky 96 Dec 15, 2022
➕ An efficient and beaufitul Multi Float action button library based on Twitter implemented in Jetpack Compose 🚀

Multi Float Action Button ➕ An efficient and beaufitul Multi Float action button library based on Twitter implemented in Jetpack Compose ?? Including

Geovani Amaral 8 Oct 15, 2022
Base on android-process-button this is the advanced version of the android-process-button.

Rock Button release log Base on android-process-button this is the advanced version of the android-process-button ##Main Features ActionProcessButton

MDCCLXXVI KPT 119 Nov 25, 2022
Android Circular Progress Button

?? Before using this library, read information below ?? This library is not more supported. If you want to add new feature or fix a bug, grab source

Dmytro Danylyk 5.6k Jan 7, 2023
Android Buttons With Built-in Progress Meters.

Description Android Buttons With Built-in Progress Meters. Wiki Home Screenshots User Guide Integration The lib is available on Maven Central, you can

Dmytro Danylyk 3k Dec 29, 2022
Circle button widget for Android

DEPRECATED This library is deprecated and no new development is taking place. Consider using a FAB(Floating action button) instead. E.g. the Android D

Markus Hintersteiner 1.5k Dec 9, 2022
Android button which moves in eight direction.

Moving Button Android button which moves in eight direction. Preview Sample Demo You can download demo movie file here : demo.mov It's also on Youtube

Leonardo Taehwan Kim 130 Nov 22, 2022