An open API service indexing awesome lists of open source software.

https://github.com/raheemadamboev/image-radio-button-android

📻 Light library for custom radio button with image functionality
https://github.com/raheemadamboev/image-radio-button-android

android android-library custom-radiobutton google-material-design image-button radio-button radio-group view

Last synced: 3 months ago
JSON representation

📻 Light library for custom radio button with image functionality

Awesome Lists containing this project

README

        

Image Radio Button


Android
Version
License
API


📻 ImageRadioButtonAndroid is a light library for custom radio button with image functionality. You can easily add image to radio button. Integration is very easy.

# Setup

Add the maven library bucket to the `dependencyResolutionManagement.repositories` block in `settings.gradle.kts` file as follows:
```kotlin
dependencyResolutionManagement {
...
repositories {
...
maven("https://jitpack.io")
}
}
```

Install the library to the project in desired module's `build.gradle.kts` file. Replace `` with the actual version:
```kotlin
implementation("com.github.raheemadamboev:image-radio-button-android:")
```

# Implementation

Add **GravityRadioGroup** to your XML layout:
```xml

```

Add **GravityImageRadioButton** inside the **GravityRadioGroup** and set **required** attributes below:

```xml

```

# Attributes

| Attribute | Type | Usage |
| --------------------------------------| ------------- | -------------------------------------------------------------------- |
| `app:girbText` | string | String to display |
| `app:girbUnpressedTextColor` | color | Color of text when radio button is unpressed/unchecked |
| `app:girbPressedTextColor` | color | Color of text when radio button is pressed/checked |
| `app:girbImage` | drawable | Image drawable to display |
| `app:girbUnpressedImageTint` | color | Tint color of image when radio button is unpressed/unchecked |
| `app:girbPressedImageTint` | color | Tint color of image when radio button is pressed/checked |
| `app:girbPressedBackgroundDrawable` | drawable | Background drawable when radio button is pressed/checked |

_If you don't want to set tint to ImageView of RadioButton, just don't set_ `app:girbUnpressedImageTint` _and_ `app:girbPressedImageTint` _attributes in XML!_

# Demo



Programming pictures are placed with the help of this library in this demo application. When radio button is clicked, its text gets shown via Toast.

Download demo

# Projects using this library

**GoTest** 250 000+ downloads in Google Play Store

**Buxgalteriya schyotlar rejasi** 50 000+ downloads in Google Play Store

**Irregular Verbs** 25 000+ downloads in Google Play Store

# License

```xml
Designed and developed by raheemadamboev (Raheem) 2022.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```