class FilterDrawer<Parent : ParentItem, Child : ChildItem>
The actual FilterDrawer itself
builder
- A reference of DrawerBuilder used to build this FilterDrawer
drawerLayout
- The DrawerLayout that the FilterDrawer relies on
filterView
- The View of FilterDrawer
Parent
- Type that extends ParentItem
Child
- Type that extends ChildItem
Author
Camerash
See Also
interface OnChildSelectListener<Parent : ParentItem, Child : ChildItem>
Listener for events when status of ChildItem in FilterDrawer changes |
|
interface OnFilterControlClickListener
Listener for event when FilterDrawer's control buttons are clicked |
FilterDrawer(builder: DrawerBuilder<Parent, Child>, drawerLayout: DrawerLayout, filterView: View)
The actual FilterDrawer itself |
val adapter: ParentAdapter<Parent, Child> |
|
val applyBtn: Button |
|
val recyclerView: RecyclerView |
|
val resetBtn: Button |
|
val toolbar: Toolbar |
|
val toolbarTitle: TextView |
fun addChildSelectListener(childSelectListener: OnChildSelectListener<Parent, Child>): Unit
Add a OnChildSelectListener to the FilterDrawer |
|
fun addDrawerListener(drawerListener: DrawerListener): Unit
Add a DrawerListener to the DrawerLayout |
|
fun addToolbarMenuListener(listener: OnMenuItemClickListener): Unit
Add a OnMenuItemClickListener to the toolbar |
|
fun closeFilterDrawer(): Unit
Shout 'Close Sesame' to the FilterDrawer |
|
fun getSelectedChildrens(): Map<Parent, Set<Child>>
Get the map of the currently selected ParentItem to Set of ChildItem |
|
fun inflateToolbarMenu(: Int): Unit
Inflate a menu inside the toolbar |
|
fun openFilterDrawer(): Unit
Shout 'Open Sesame' to the FilterDrawer |
|
fun removeChildSelectListener(childSelectListener: OnChildSelectListener<Parent, Child>): Unit
Remove the OnChildSelectListener from the FilterDrawer |
|
fun resetFilter(): Unit
Reset the FilterDrawer |
|
fun setApplyColor(color: Int): Unit
Set the color of text of the apply button in FilterDrawer |
|
fun setApplyText(text: String): Unit
Set the text of the apply button in FilterDrawer |
|
fun setFilterControlClickListener(filterControlClickListener: OnFilterControlClickListener): Unit
Set the OnFilterControlClickListener to the FilterDrawer |
|
fun setResetColor(color: Int): Unit
Set the color of text of the reset button in FilterDrawer |
|
fun setResetText(text: String): Unit
Set the text of the reset button in FilterDrawer |
|
fun setToolbarTitle(title: String): Unit
Set the title of the toolbar |
|
fun showToolbar(show: Boolean): Unit
Set visibility of toolbar |
|
fun updateItems(itemList: Collection<Parent>): Unit
Update the list of filter |