Skip to content

Commit 2d3155f

Browse files
committed
Add docs.
1 parent cea5f3f commit 2d3155f

File tree

10 files changed

+448
-113
lines changed

10 files changed

+448
-113
lines changed

README.md

+145-113
Large diffs are not rendered by default.

flowbinding-android/README.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# FlowBinding Android
2+
3+
This module provides bindings for the Android platform APIs.
4+
5+
## Download
6+
7+
```groovy
8+
implementation "io.github.reactivecircus.flowbinding:flowbinding-android:${flowbinding_version}"
9+
```
10+
11+
## Available Bindings
12+
13+
```kotlin
14+
// MenuItem
15+
fun MenuItem.actionViewEvents(handled: (MenuItemActionViewEvent) -> Boolean): Flow<MenuItemActionViewEvent>
16+
fun MenuItem.clicks(handled: (MenuItem) -> Boolean): Flow<Unit>
17+
18+
// View
19+
fun View.attachEvents(): Flow<ViewAttachEvent>
20+
fun View.clicks(): Flow<Unit>
21+
fun View.drags(handled: (DragEvent) -> Boolean = { true }): Flow<DragEvent>
22+
fun View.draws(): Flow<Unit>
23+
fun View.focusChanges(emitImmediately: Boolean = false): Flow<Boolean>
24+
fun View.globalLayouts(): Flow<Unit>
25+
fun ViewGroup.hierarchyChangeEvents(): Flow<HierarchyChangeEvent>
26+
fun View.hovers(handled: (MotionEvent) -> Boolean = { true }): Flow<MotionEvent>
27+
fun View.keys(handled: (KeyEvent) -> Boolean = { true }): Flow<KeyEvent>
28+
fun View.layoutChangeEvents(): Flow<LayoutChangeEvent>
29+
fun View.layoutChanges(): Flow<Unit>
30+
fun View.longClicks(): Flow<Unit>
31+
fun View.preDraws(proceedDrawingPass: () -> Boolean): Flow<Unit>
32+
fun View.scrollChangeEvents(): Flow<ScrollChangeEvent>
33+
fun View.systemUiVisibilityChanges(): Flow<Int>
34+
fun View.touches(handled: (MotionEvent) -> Boolean = { true }): Flow<MotionEvent>
35+
36+
// AbsListView
37+
fun AbsListView.scrollEvents(): Flow<ScrollEvent>
38+
39+
// Adapter
40+
fun Adapter.dataChanges(emitImmediately: Boolean = false): Flow<Adapter>
41+
42+
// AdapterView
43+
fun <T : Adapter> AdapterView<T>.itemClickEvents(): Flow<AdapterViewItemClickEvent>
44+
fun <T : Adapter> AdapterView<T>.itemClicks(): Flow<Int>
45+
fun <T : Adapter> AdapterView<T>.itemLongClickEvents(handled: (AdapterViewItemLongClickEvent) -> Boolean = { true }): Flow<AdapterViewItemLongClickEvent>
46+
fun <T : Adapter> AdapterView<T>.itemLongClicks(handled: () -> Boolean = { true }): Flow<Int>
47+
fun <T : Adapter> AdapterView<T>.itemSelections(emitImmediately: Boolean = false): Flow<Int>
48+
fun <T : Adapter> AdapterView<T>.selectionEvents(emitImmediately: Boolean = false): Flow<AdapterViewSelectionEvent>
49+
50+
// AutoCompleteTextView
51+
fun AutoCompleteTextView.dismisses(): Flow<Unit>
52+
fun AutoCompleteTextView.itemClickEvents(): Flow<AdapterViewItemClickEvent>
53+
54+
// CompoundButton
55+
fun CompoundButton.checkedChanges(emitImmediately: Boolean = false): Flow<Boolean>
56+
57+
// PopupMenu
58+
fun PopupMenu.dismisses(): Flow<Unit>
59+
fun PopupMenu.itemClicks(): Flow<MenuItem>
60+
61+
// RadioGroup
62+
fun RadioGroup.checkedChanges(emitImmediately: Boolean = false): Flow<Int>
63+
64+
// RatingBar
65+
fun RatingBar.ratingChangeEvents(emitImmediately: Boolean = false): Flow<RatingChangeEvent>
66+
fun RatingBar.ratingChanges(emitImmediately: Boolean = false): Flow<Float>
67+
68+
// SearchView
69+
fun SearchView.queryTextChanges(emitImmediately: Boolean = false): Flow<CharSequence>
70+
fun SearchView.queryTextEvents(emitImmediately: Boolean = false): Flow<QueryTextEvent>
71+
72+
// SeekBar
73+
fun SeekBar.changeEvents(emitImmediately: Boolean = false): Flow<SeekBarChangeEvent>
74+
fun SeekBar.progressChanges(emitImmediately: Boolean = false): Flow<Int>
75+
76+
// TextView
77+
fun TextView.afterTextChanges(emitImmediately: Boolean = false): Flow<AfterTextChangeEvent>
78+
fun TextView.beforeTextChanges(emitImmediately: Boolean = false): Flow<BeforeTextChangeEvent>
79+
fun TextView.editorActionEvents(handled: (EditorActionEvent) -> Boolean = { true }): Flow<EditorActionEvent>
80+
fun TextView.textChangeEvents(emitImmediately: Boolean = false): Flow<TextChangeEvent>
81+
fun TextView.textChanges(emitImmediately: Boolean = false): Flow<CharSequence>
82+
```

flowbinding-appcompat/README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# FlowBinding AppCompat
2+
3+
This module provides bindings for the **AndroidX AppCompat** library.
4+
5+
## Transitive Dependency
6+
7+
`androidx.appcompat:appcompat`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-appcompat:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
// ActionMenuView
19+
fun ActionMenuView.itemClicks(): Flow<MenuItem>
20+
21+
// PopupMenu
22+
fun PopupMenu.dismisses(): Flow<Unit>
23+
fun PopupMenu.itemClicks(): Flow<MenuItem>
24+
25+
// SearchView
26+
fun SearchView.queryTextChanges(emitImmediately: Boolean = false): Flow<CharSequence>
27+
fun SearchView.queryTextEvents(emitImmediately: Boolean = false): Flow<QueryTextEvent>
28+
29+
// Toolbar
30+
fun Toolbar.itemClicks(): Flow<MenuItem>
31+
fun Toolbar.navigationClicks(): Flow<Unit>
32+
```

flowbinding-core/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# FlowBinding Core
2+
3+
This module provides bindings for the **AndroidX Core** library.
4+
5+
## Transitive Dependency
6+
7+
`androidx.core:core`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-core:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
fun NestedScrollView.scrollChangeEvents(): Flow<ScrollChangeEvent>
19+
```

flowbinding-drawerlayout/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# FlowBinding DrawerLayout
2+
3+
This module provides bindings for the **AndroidX DrawerLayout** library.
4+
5+
## Transitive Dependency
6+
7+
`androidx.drawerlayout:drawerlayout`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-drawerlayout:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
fun DrawerLayout.drawerStateChanges(gravity: Int, emitImmediately: Boolean = false): Flow<Boolean>
19+
```

flowbinding-material/README.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# FlowBinding Material Components
2+
3+
This module provides bindings for the **Material Components** library.
4+
5+
## Transitive Dependency
6+
7+
`com.google.android.material:material`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-material:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
// AppBarLayout
19+
fun AppBarLayout.offsetChanges(): Flow<Int>
20+
21+
// BottomNavigationView
22+
fun BottomNavigationView.itemReselections(): Flow<MenuItem>
23+
fun BottomNavigationView.itemSelections(emitImmediately: Boolean = false): Flow<MenuItem>
24+
25+
// BottomSheetBehavior
26+
fun View.bottomSheetSlides(): Flow<Float>
27+
fun View.bottomSheetStateChanges(): Flow<Int>
28+
29+
// Chip
30+
fun Chip.closeIconClicks(): Flow<Unit>
31+
32+
// ChipGroup
33+
fun ChipGroup.chipCheckedChanges(emitImmediately: Boolean = false): Flow<Int>
34+
35+
// MaterialButton
36+
fun MaterialButton.checkedChanges(): Flow<Boolean>
37+
38+
// MaterialButtonToggleGroup
39+
fun MaterialButtonToggleGroup.buttonCheckedChanges(): Flow<MaterialButtonCheckedChangedEvent>
40+
41+
// MaterialDatePicker
42+
fun <S> MaterialDatePicker<S>.cancels(): Flow<Unit>
43+
fun <S> MaterialDatePicker<S>.dismisses(): Flow<Unit>
44+
fun <S> MaterialDatePicker<S>.negativeButtonClicks(): Flow<Unit>
45+
fun <S> MaterialDatePicker<S>.positiveButtonClicks(): Flow<S>
46+
47+
// NavigationView
48+
fun NavigationView.itemSelections(emitImmediately: Boolean = false): Flow<MenuItem>
49+
50+
// Slider
51+
fun Slider.valueChanges(emitImmediately: Boolean = false): Flow<Float>
52+
53+
// Snackbar
54+
fun Snackbar.dismissEvents(): Flow<Int>
55+
fun Snackbar.shownEvents(): Flow<Unit>
56+
57+
// SwipeDismissBehavior
58+
fun View.dismisses(): Flow<View>
59+
fun View.swipeDismissDragStateChanges(): Flow<Int>
60+
61+
// TabLayout
62+
fun TabLayout.tabSelectionEvents(emitImmediately: Boolean = false): Flow<TabLayoutSelectionEvent>
63+
64+
// TabLayout
65+
fun TabLayout.textInputLayoutStartIconClicks(): Flow<Unit>
66+
fun TabLayout.textInputLayoutEndIconClicks(): Flow<Unit>
67+
fun TabLayout.textInputLayoutStartIconLongClicks(): Flow<Unit>
68+
fun TabLayout.textInputLayoutEndIconLongClicks(): Flow<Unit>
69+
```

flowbinding-navigation/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# FlowBinding Navigation
2+
3+
This module provides bindings for the **AndroidX Navigation** library.
4+
5+
## Transitive Dependency
6+
7+
`androidx.navigation:navigation-runtime`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-navigation:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
fun NavController.destinationChangeEvents(): Flow<DestinationChangeEvent>
19+
```

flowbinding-recyclerview/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# FlowBinding RecyclerView
2+
3+
This module provides bindings for the **AndroidX RecyclerView** library.
4+
5+
## Transitive Dependency
6+
7+
`androidx.recyclerview:recyclerview`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-recyclerview:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
fun <T : RecyclerView.Adapter<out RecyclerView.ViewHolder>> T.dataChanges(emitImmediately: Boolean = false): Flow<T>
19+
fun RecyclerView.childAttachStateChangeEvents(): Flow<RecyclerViewChildAttachStateChangeEvent>
20+
fun RecyclerView.flingEvents(handled: (FlingEvent) -> Boolean = { true }): Flow<FlingEvent>
21+
fun RecyclerView.scrollEvents(): Flow<RecyclerViewScrollEvent>
22+
fun RecyclerView.scrollStateChanges(): Flow<Int>
23+
```
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# FlowBinding SwipeRefreshLayout
2+
3+
This module provides bindings for the **AndroidX SwipeRefreshLayout** library.
4+
5+
## Transitive Dependency
6+
7+
`androidx.swiperefreshlayout:swiperefreshlayout`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-swiperefreshlayout:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
fun SwipeRefreshLayout.refreshes(): Flow<Unit>
19+
```

flowbinding-viewpager2/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# FlowBinding ViewPager2
2+
3+
This module provides bindings for the **AndroidX ViewPager2** library.
4+
5+
## Transitive Dependency
6+
7+
`androidx.viewpager2:viewpager2`
8+
9+
## Download
10+
11+
```groovy
12+
implementation "io.github.reactivecircus.flowbinding:flowbinding-viewpager2:${flowbinding_version}"
13+
```
14+
15+
## Available Bindings
16+
17+
```kotlin
18+
fun ViewPager2.pageScrollEvents(): Flow<ViewPager2PageScrollEvent>
19+
fun ViewPager2.pageScrollStateChanges(): Flow<Int>
20+
fun ViewPager2.pageSelections(emitImmediately: Boolean = false): Flow<Int>
21+
```

0 commit comments

Comments
 (0)