All Projects → kittinunf → Statik

kittinunf / Statik

Licence: MIT license
A simple static list information backed by RecyclerView for Android in Kotlin

Programming Languages

kotlin
9241 projects
shell
77523 projects

Projects that are alternatives of or similar to Statik

AccordionRecycler
Android RecyclerView Adapter with nested items & expand/contract functionality
Stars: ✭ 17 (-22.73%)
Mutual labels:  recyclerview, recyclerview-adapter, recyclerview-multi-type
kandy
Sweet Android libraries written in Kotlin
Stars: ✭ 19 (-13.64%)
Mutual labels:  recyclerview, recyclerview-adapter, recyclerview-multi-type
LxAdapter
RecyclerView Adapter Library
Stars: ✭ 50 (+127.27%)
Mutual labels:  recyclerview, recyclerview-adapter, recyclerview-multi-type
RecyclerELE
Android Library for easy addition of Empty, Loading and Error views in a RecyclerView
Stars: ✭ 27 (+22.73%)
Mutual labels:  recyclerview, recyclerview-adapter, recyclerview-multi-type
Admobadapter
It wraps your Adapter to display Admob native ads and banners in a ListView/RecyclerView data set. It based on the Yahoo fetchr project https://github.com/yahoo/fetchr
Stars: ✭ 224 (+918.18%)
Mutual labels:  recyclerview, recyclerview-adapter
Async Expandable List
Stars: ✭ 221 (+904.55%)
Mutual labels:  recyclerview, recyclerview-adapter
recyclerview-kotlin
10+ Tutorials on RecyclerView in Kotlin
Stars: ✭ 41 (+86.36%)
Mutual labels:  recyclerview, recyclerview-adapter
MultiTypeAdapter
RecyclerView通用多类型适配器MultiTypeAdapter,以布局文件为单位更细粒度的条目复用。
Stars: ✭ 18 (-18.18%)
Mutual labels:  recyclerview, recyclerview-adapter
Customadapter
RV Adapter 优雅封装,抽取列表模版,可以快速的添加一个列表,使用组装的方式构建Adapter,抽象Cell 角色,负责创建ViewHolder,绑定数据和逻辑处理。Cell为一个独立的组件。
Stars: ✭ 172 (+681.82%)
Mutual labels:  recyclerview, recyclerview-adapter
recyclerview-adapters
Multiple item adapters for RecyclerView (inspired by Merge Adapter)
Stars: ✭ 24 (+9.09%)
Mutual labels:  recyclerview, recyclerview-adapter
RecyclerView
支持下拉刷新,上拉加载,Header,Footer,复杂多种数据结构类型
Stars: ✭ 318 (+1345.45%)
Mutual labels:  recyclerview-adapter, recyclerview-multi-type
Flap
Flap(灵动),一个基于 RecyclerView 的页面组件化框架。
Stars: ✭ 204 (+827.27%)
Mutual labels:  recyclerview, recyclerview-adapter
Moretype
new method to build data in RecyclerView with Kotlin!
Stars: ✭ 189 (+759.09%)
Mutual labels:  recyclerview, recyclerview-adapter
Adapterdelegates
"Favor composition over inheritance" for RecyclerView Adapters
Stars: ✭ 2,735 (+12331.82%)
Mutual labels:  recyclerview, recyclerview-adapter
Airbnb Android Google Map View
This is a sample Android Application which has Google Map view similar to what AirBnb Android Application. Moving Markers like Uber/Ola. Custom Google Search for places. Recycler view with Animations added.
Stars: ✭ 175 (+695.45%)
Mutual labels:  recyclerview, recyclerview-adapter
BaseRecyclerViewAdapter
RecyclerView通用适配器
Stars: ✭ 14 (-36.36%)
Mutual labels:  recyclerview, recyclerview-adapter
AdapterCommands
Drop in solution to animate RecyclerView's dataset changes by using command pattern
Stars: ✭ 74 (+236.36%)
Mutual labels:  recyclerview, recyclerview-adapter
recyclerview-expandable
RecyclerView implementation of traex's ExpandableLayout
Stars: ✭ 70 (+218.18%)
Mutual labels:  recyclerview, recyclerview-adapter
Recycling
A Library for make an easy and faster RecyclerView without adapter
Stars: ✭ 57 (+159.09%)
Mutual labels:  recyclerview, recyclerview-adapter
slush
This library will no longer be updated 😭
Stars: ✭ 26 (+18.18%)
Mutual labels:  recyclerview, recyclerview-adapter

Statik

jcenter Kotlin Build Status

A Kotlin DSL for Android made to display a collection of data-backed views concisely and elegantly.

Overview

Do you want to show a list of items in Android and wish there was a faster or simpler way?

Look no further, Statik is designed for you!

Statik is a data-oriented Kotlin DSL, backed by the standard RecyclerView.

Just describe your data, set it into the provided adapter and the rest will be handled by Statik, it's that simple!

Since Statik is backed by RecyclerView, you can display any type of view.

Installation

Gradle

repositories {
    jcenter()
}

dependencies {
    implementation 'com.github.kittinunf.statik:statik:<latest-version>'
}

Usage

As an example, let's display a simple list.

First, setup a simple RecyclerView in your layout

 <android.support.v7.widget.RecyclerView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layoutManager="android.support.v7.widget.LinearLayoutManager"/> 

Then use the Statik Kotlin DSL to describe how your list should look like

// describe a header
val h1 = textHeader {
            text = "Header"
            onClickListener = {
                println("Header is clicked")
            }
         }
         
// describe the different rows  
val r1 = textRow {
            text = "Row 1"
         }      
         
val r2 = textRow {
            text = "Row 2"
         }          
         
val r3 = textRow {
            text = "Row 3"
         }          
         
// describe a footer        
val f1 = textFooter {
            text = "Footer"
            onClickListener = {
                println("Footer is clicked")
            }
         }
        
// describe a section for the above
val s1 = section {
            header(h1)
            rows(r1, r2, r3)
            footer(f1)
         }

Set the section(s) into the adapter

val statikAdapter = adapter {
                        sections(s1)
                    }    

That's all! Just set the adapter in the RecyclerView

list.adapter = statikAdapter

Advanced Usage

For additional examples and use cases, make sure to check out the sample demo.

Currently, examples include:

  • Multiple view types with respective event listeners
  • Multiple sections
  • Adding views dynamically

Credits

Statik is brought to you by contributors.

Licenses

Statik is released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].