Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raheemadamboev/image-radio-button-android
📻 Light library that is beautiful 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 that is beautiful custom radio button with image functionality
- Host: GitHub
- URL: https://github.com/raheemadamboev/image-radio-button-android
- Owner: raheemadamboev
- License: apache-2.0
- Created: 2021-12-19T12:20:13.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T13:35:24.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T19:56:59.711Z (7 months ago)
- Topics: android, android-library, custom-radiobutton, google-material-design, image-button, radio-button, radio-group, view
- Language: Kotlin
- Homepage:
- Size: 4.46 MB
- Stars: 8
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - raheemadamboev/image-radio-button-android - 📻 Light library for custom radio button with image functionality (Kotlin)
README
Image Radio Button
📻 Light library that is beautiful custom radio button with image functionality. You can easily add image to radio button. Integration is very easy.# Setup
Add it in your root **build.gradle** at the end of repositories:
```groovy
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```Include below dependency in build.gradle of application and sync it:
```groovy
implementation 'com.github.raheemadamboev:image-radio-button-android:1.0.7'
```
# ImplementationAdd **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.
# Projects using this library
**GoTest** 150 000+ downloads in Google Play Store
**Buxgalteriya schyotlar rejasi** 20 000+ downloads in Google Play Store
**Irregular Verbs** 20 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 athttp://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.
```