Amazing and easy to use Accordion Library for Android built with kotlin

Overview

AccoLib

License API

AccoLib Logo

An easy-to-use, amazing Accordion Library for Android built with kotlin.

It reduces the amount of code needed to make Accordions in android, way less than what was needed before

Demo

Image of Preview

Requirements

  • Android minSDKVersion 21

Usage

Add it in your root build.gradle at the end of repositories

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

Add the dependency

dependencies {
    implementation 'com.github.GouravKhunger:AccoLib:v1.0.0'
}

How to use this library

Add the AccoLib widget to your xml layout

<com.gouravkhunger.accolib.widget.Accordion
            android:id="@+id/accordion"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:title="@string/small_title"
            app:text="@string/small_text"
            app:titleSize="18sp"
            app:textSize="16sp"
            app:titleColor="@android:color/black"
            app:textColor="@android:color/darker_gray"/>

Available attributes

Currently, the AccoLib widget supports only these attributes and customizations, more functionality to be shipped soon 🚀 .

Name Type Description
title string Title of the accordion.
text string Text to be displayed in the accordion.
titleSize dimension Size of the Title(input in any format but is applied as raw pixel)
textSize dimension Size of the Text(input in any format works but is applied as raw pixel)
titleColor color Color to be applied to the Title of the accordion.
textColor color Color to be applied to the text of the accordion.

License

MIT License

Copyright (c) 2017 GwonHyeok

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
Android Multi Theme Switch Library ,use  kotlin language ,coroutine ,and so on ...
Android Multi Theme Switch Library ,use kotlin language ,coroutine ,and so on ...

Magic Mistletoe Android多主题(换肤)切换框架 背景 时隔四年,在网易换肤之前的思路下,做了几点改进,现在完全通过反射创建View,并且在SkinLoadManager中提供一个configCustomAttrs以支持自定义View的属性插队替换 摈弃了之前的AsyncTask

Tools for Kotlin/Kscript to easy write shell command line in kotlin code

Kscript Tools Easy way to run shell command line in kotlin and other tools Usage Used in kscript: @file:DependsOn("com.sealwu:kscript-tools:1.0.2") Us

A sample skeleton backend app built using Spring Boot kotlin, Expedia Kotlin Graphql, Reactive Web that can be deployed to Google App Engine Flexible environmennt

spring-kotlin-gql-gae This is a sample skeleton of a backend app that was built using: Spring Boot(Kotlin) Reactive Web Sprinng Data R2DBC with MYSQL

FirestoreCleanArchitectureApp is an app built with Kotlin and Firestore that displays data in real-time using the MVVM Architecture Pattern. For the UI it uses Jetpack Compose,  Android's modern toolkit for building native UI.
FirestoreCleanArchitectureApp is an app built with Kotlin and Firestore that displays data in real-time using the MVVM Architecture Pattern. For the UI it uses Jetpack Compose, Android's modern toolkit for building native UI.

FirestoreCleanArchitectureApp FirestoreCleanArchitectureApp is an app built with Kotlin and Cloud Firestore that displays data in real-time using Andr

Accounting-App - An Android app built with Kotlin, Material, Jetpack Compose, Hilt, Room, Coroutines, Data-Store, MVVM-Clean Architecture and JUnit tests
Blog Backend Api built with Kotlin, Springboot and AWS

Kotlin, Spring Boot, MySQL, JPA, Hibernate Rest API for Blogs A Restful CRUD API using Kotlin, Spring Boot, Mysql, JPA and Hibernate hosted on AWS Ela

Spring Boot built using Kotlin, H2, Postgres, Hibernate and JPA

Spring-Boot-Kotlin-Sample Spring Boot built using Kotlin, H2, Postgres, Hibernate and JPA Getting Started Reference Documentation For further referenc

Kotlin multi platform project template and sample app with everything shared except the UI. Built with clean architecture + MVI
Kotlin multi platform project template and sample app with everything shared except the UI. Built with clean architecture + MVI

KMMNewsAPP There are two branches Main News App Main The main branch is a complete template that you can clone and use to build the awesome app that y

An application with the use of Kotlin can change the color of the text, and the background with the press of a button and switch.
An application with the use of Kotlin can change the color of the text, and the background with the press of a button and switch.

An application with the use of Kotlin can change the color of the text, and the background with the press of a button and switch.

Comments
  • Accordion opening and closing animation

    Accordion opening and closing animation

    The accordion just toggles the visibility of the text for now. It would be great if the text has a sliding down animation on being visible, and a sliding up animation on being dismissed.

    Check line 152 of Accordion.kt file

    enhancement good first issue 
    opened by gouravkhunger 9
Releases(1.1.1)
Owner
Gourav Khunger
Android app developer
Gourav Khunger
A collection of katas either copied or ported from some amazing folks

Kotlin Refactoring Katas A collection of katas either copied or ported from some

Ragunath Jawahar 5 Nov 15, 2022
An Android app built with Kotlin, consuming StarWars API to display characters of the popular StarWars Movie. It is built with the MVVM pattern and the latest Jetpack components.

StarWars An Android app built with Kotlin, consuming StarWars API to display characters of the popular StarWars Movie. It is built with the MVVM patte

Joel Kanyi 42 Nov 20, 2022
Shreyas Patil 2.2k Jan 4, 2023
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT ??️ NotyKT is the complete Kotlin-stack note taking ??️ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Dec 26, 2022
Katoot - An easy-to-use (blocking) Kotlin wrapper for Kahoot's REST api

katoot An easy-to-use (blocking) Kotlin wrapper for Kahoot's REST api. Usage Qui

Subham 1 Jul 17, 2022
A complete Kotlin application built to demonstrate the use of Modern development tools with best practices implementation using multi-module architecture developed using SOLID principles

This repository serves as template and demo for building android applications for scale. It is suited for large teams where individuals can work independently on feature wise and layer wise reducing the dependency on each other.

Devrath 11 Oct 21, 2022
A custom view for rating which easy to make and use, but function is excellent

QRatingView A custom view for rating which easy to make and use, but function is excellent Effect Picture Properties <declare-styleable name="QRat

QCoder 1 Dec 3, 2021
🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

??The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

Rouse 1.3k Dec 30, 2022
Jetpack Compose for Desktop and Web, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.

Jetpack Compose for Desktop and Web, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.

JetBrains 10k Jan 7, 2023
AGStateMachineBuilder - a library for easy creation of state machines using advanced concepts of kotlin

This is a library for easy creation of state machines using advanced concepts of kotlin. As of 2/15/2022, this library only works in kotlin, but will be expanded to work in Java later (whenever I get bored enough to rewrite an entire code structure in java :/ )

Sanjay Mohan 1 Feb 19, 2022