This is utility classes for RecyclerView and classic AdapterView(such as ListView, Spinner).
- ScrambleAdapter
- This separate creating ViewHolder logic from RecyclerView.Adapter.
- Once gave DataClass-ViewHolder relation, this will bind them automatically.
- The relation of DataClass-ViewHolder are declared by ViewHolderFactory.
- ViewHolderFactory
- Describe the relation of DataClass-ViewHolder.
- This has onCreateViewHolder() / onBindViewHolder() / isAssignable() / etc methods.
- ListenerRelay
- Empty implementation of frequently used listeners. This is used by ScrambleAdapter.
- CodeLabelAdapter
- The adapter for Enum. But you can adopt this to other standard data classes.
- ClassicScrambleAdapter
- Classic version of ScrambleAdapter. It can go with classic AdapterView(such as ListView, Spinner).
- AbsTreeItemAdapter
- This provides foldable tree list.
- AbsChoosableTreeItemAdapter
- This supports single choice and multi choice mode.
Add folloing lines to build.gradle
repositories {
maven {
url "http://dl.bintray.com/cattaka/maven"
}
}
dependencies {
compile 'net.cattaka:adapter-toolbox:$VERSION@aar'
}
Put $VERSION that you want to use. You can check available versions here. https://bintray.com/cattaka/maven/adapter-toolbox/view
This repository contains example application. You can clone this repository and run example application with Android Studio.
Copyright 2016 Takao Sumitomo
Copyright 2014 Josh Burton
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.