-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
125 changed files
with
2,177 additions
and
160 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
.../cycle-compose/com.chrynan.cycle.compose/-compose-fragment/-compose-fragment.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[ComposeFragment](-compose-fragment.md) | ||
|
||
# ComposeFragment | ||
|
||
[android]\ | ||
constructor() |
11 changes: 11 additions & 0 deletions
11
...e-compose/cycle-compose/com.chrynan.cycle.compose/-compose-fragment/-content.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[Content](-content.md) | ||
|
||
# Content | ||
|
||
[android]\ | ||
|
||
@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) | ||
|
||
abstract fun [Content](-content.md)() | ||
|
||
Display the UI content. Remember to subscribe to the state changes using the [stateChanges](../../../../cycle-compose/cycle-compose/com.chrynan.cycle.compose/state-changes.md) function within this function. Using the [renderState](../../../../cycle-compose/com.chrynan.cycle.compose/-compose-fragment/render-state.md) property won't work because it won't trigger a recomposition of the composable function when the state changes. |
6 changes: 6 additions & 0 deletions
6
...compose/com.chrynan.cycle.compose/-compose-fragment/compose-view-initializer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[composeViewInitializer](compose-view-initializer.md) | ||
|
||
# composeViewInitializer | ||
|
||
[android]\ | ||
open fun [ComposeView](https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/ComposeView.html).[composeViewInitializer](compose-view-initializer.md)() |
167 changes: 167 additions & 0 deletions
167
...ycle-compose/cycle-compose/com.chrynan.cycle.compose/-compose-fragment/index.md
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
...ose/cycle-compose/com.chrynan.cycle.compose/-compose-fragment/on-create-view.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[onCreateView](on-create-view.md) | ||
|
||
# onCreateView | ||
|
||
[android]\ | ||
open override fun [onCreateView](on-create-view.md)(inflater: [LayoutInflater](https://developer.android.com/reference/kotlin/android/view/LayoutInflater.html), container: [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html)?, savedInstanceState: [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html)?): [View](https://developer.android.com/reference/kotlin/android/view/View.html)? |
26 changes: 26 additions & 0 deletions
26
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-compose-layout.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//[cycle-compose](../../index.md)/[com.chrynan.cycle.compose](index.md)/[ComposeLayout](-compose-layout.md) | ||
|
||
# ComposeLayout | ||
|
||
[common]\ | ||
|
||
@ExperimentalCoroutinesApi | ||
|
||
@FlowPreview | ||
|
||
@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) | ||
|
||
@[Stable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Stable.html) | ||
|
||
fun <[State](-compose-layout.md), [Change](-compose-layout.md)> [ComposeLayout](-compose-layout.md)(layout: [Layout](-layout/index.md)<[State](-compose-layout.md), [Change](-compose-layout.md)>) | ||
|
||
Renders the provided [layout](-compose-layout.md) as a [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html). | ||
|
||
Example usage: | ||
|
||
```kotlin | ||
@Composable | ||
fun Home { | ||
ComposeLayout(homeLayout) | ||
} | ||
``` |
22 changes: 22 additions & 0 deletions
22
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/-content.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[Content](-content.md) | ||
|
||
# Content | ||
|
||
[common]\ | ||
|
||
@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) | ||
|
||
abstract fun [Content](-content.md)() | ||
|
||
Renders the UI content for this Layout. Remember to subscribe to the state changes using the [stateChanges](../state-changes.md) function within this function. Using the [renderState](render-state.md) property won't work because it won't trigger a recomposition of the composable function when the state changes. | ||
|
||
Example usage: | ||
|
||
```kotlin | ||
@Composable | ||
override fun Content() { | ||
val state by stateChanges() | ||
|
||
Text("State = $state") | ||
} | ||
``` |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/-layout.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[Layout](-layout.md) | ||
|
||
# Layout | ||
|
||
[common]\ | ||
constructor() |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/bind.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[bind](bind.md) | ||
|
||
# bind | ||
|
||
[common]\ | ||
override fun [bind](bind.md)() |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/equals.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[equals](equals.md) | ||
|
||
# equals | ||
|
||
[common]\ | ||
open operator override fun [equals](equals.md)(other: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/hash-code.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[hashCode](hash-code.md) | ||
|
||
# hashCode | ||
|
||
[common]\ | ||
open override fun [hashCode](hash-code.md)(): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
60 changes: 60 additions & 0 deletions
60
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md) | ||
|
||
# Layout | ||
|
||
[common]\ | ||
@FlowPreview | ||
|
||
@ExperimentalCoroutinesApi | ||
|
||
@[Stable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Stable.html) | ||
|
||
abstract class [Layout](index.md)<[State](index.md), [Change](index.md)> : [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md)<[State](index.md), [Change](index.md)> , [Bindable](../../../../cycle-core/cycle-core/com.chrynan.cycle/-bindable/index.md) | ||
|
||
A component that implements the [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md) interface and serves as the binding between this presentation library and Jetpack Compose. Typically, [Layout](index.md)s are used to represent the "Screen" components in an application. | ||
|
||
Example usage: | ||
|
||
```kotlin | ||
class HomeLayout : Layout<HomeState, HomeChange>() { | ||
|
||
override val viewModel = ViewModel<I, S, C>( | ||
perform = { intent, state -> ... }, | ||
reduce = { state, change -> ... }) | ||
|
||
@Composable | ||
override fun Content() { | ||
val state by stateChanges() | ||
|
||
// Put Composable UI code here using the [state] value | ||
} | ||
} | ||
``` | ||
|
||
## Constructors | ||
|
||
| | | | ||
|---|---| | ||
| [Layout](-layout.md) | [common]<br>constructor() | | ||
|
||
## Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [bind](bind.md) | [common]<br>override fun [bind](bind.md)() | | ||
| [Content](-content.md) | [common]<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>abstract fun [Content](-content.md)()<br>Renders the UI content for this Layout. Remember to subscribe to the state changes using the [stateChanges](../state-changes.md) function within this function. Using the [renderState](render-state.md) property won't work because it won't trigger a recomposition of the composable function when the state changes. | | ||
| [equals](equals.md) | [common]<br>open operator override fun [equals](equals.md)(other: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | | ||
| [hashCode](hash-code.md) | [common]<br>open override fun [hashCode](hash-code.md)(): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | | ||
| [stateChanges](../state-changes.md) | [common]<br>@ExperimentalCoroutinesApi<br>@FlowPreview<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>fun <[State](../state-changes.md), [Change](../state-changes.md)> [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md)<[State](../state-changes.md), [Change](../state-changes.md)>.[stateChanges](../state-changes.md)(context: [CoroutineContext](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/-coroutine-context/index.html) = EmptyCoroutineContext): [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html)<[State](../state-changes.md)?><br>Obtains the changes to the underlying [State](../state-changes.md) as a Jetpack Compose [androidx.compose.runtime.State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html) value, so that the changes can cause the [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) function to be re-composed.<br>[common]<br>@ExperimentalCoroutinesApi<br>@FlowPreview<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>fun <[State](../state-changes.md), [Change](../state-changes.md)> [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md)<[State](../state-changes.md), [Change](../state-changes.md)>.[stateChanges](../state-changes.md)(initial: [State](../state-changes.md)?, context: [CoroutineContext](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/-coroutine-context/index.html) = EmptyCoroutineContext): [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html)<[State](../state-changes.md)?><br>Obtains the changes to the underlying [State](../state-changes.md), starting with the provided [initial](../state-changes.md) value, as a Jetpack Compose [androidx.compose.runtime.State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html) value, so that the changes can cause the [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) function to be re-composed. | | ||
| [toString](to-string.md) | [common]<br>open override fun [toString](to-string.md)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | | ||
| [unaryPlus](../unary-plus.md) | [common]<br>@ExperimentalCoroutinesApi<br>@FlowPreview<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>inline operator fun <[State](../unary-plus.md), [Change](../unary-plus.md)> [Layout](index.md)<[State](../unary-plus.md), [Change](../unary-plus.md)>.[unaryPlus](../unary-plus.md)()<br>Renders this [Layout](index.md) as a [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html). | | ||
| [unbind](unbind.md) | [common]<br>override fun [unbind](unbind.md)() | | ||
|
||
## Properties | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [isBound](is-bound.md) | [common]<br>override val [isBound](is-bound.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | | ||
| [key](key.md) | [common]<br>open val [key](key.md): [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)? | | ||
| [renderState](render-state.md) | [common]<br>override val [renderState](render-state.md): [State](index.md)? | | ||
| [viewModel](view-model.md) | [common]<br>abstract override val [viewModel](view-model.md): [ViewModel](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model/index.md)<[State](index.md), [Change](index.md)> | |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/is-bound.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[isBound](is-bound.md) | ||
|
||
# isBound | ||
|
||
[common]\ | ||
override val [isBound](is-bound.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/key.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[key](key.md) | ||
|
||
# key | ||
|
||
[common]\ | ||
open val [key](key.md): [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)? |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/render-state.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[renderState](render-state.md) | ||
|
||
# renderState | ||
|
||
[common]\ | ||
override val [renderState](render-state.md): [State](index.md)? |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/to-string.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[toString](to-string.md) | ||
|
||
# toString | ||
|
||
[common]\ | ||
open override fun [toString](to-string.md)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/unbind.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[unbind](unbind.md) | ||
|
||
# unbind | ||
|
||
[common]\ | ||
override fun [unbind](unbind.md)() |
6 changes: 6 additions & 0 deletions
6
docs/cycle-compose/cycle-compose/com.chrynan.cycle.compose/-layout/view-model.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[viewModel](view-model.md) | ||
|
||
# viewModel | ||
|
||
[common]\ | ||
abstract override val [viewModel](view-model.md): [ViewModel](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model/index.md)<[State](index.md), [Change](index.md)> |
15 changes: 15 additions & 0 deletions
15
...e-compose/cycle-compose/com.chrynan.cycle.compose/-local-view-model-provider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//[cycle-compose](../../index.md)/[com.chrynan.cycle.compose](index.md)/[LocalViewModelProvider](-local-view-model-provider.md) | ||
|
||
# LocalViewModelProvider | ||
|
||
[common]\ | ||
|
||
@[ExperimentalPresentationApi](../../../cycle-core/cycle-core/com.chrynan.cycle/-experimental-presentation-api/index.md) | ||
|
||
@FlowPreview | ||
|
||
@ExperimentalCoroutinesApi | ||
|
||
val [LocalViewModelProvider](-local-view-model-provider.md): [ProvidableCompositionLocal](https://developer.android.com/reference/kotlin/androidx/compose/runtime/ProvidableCompositionLocal.html)<[ViewModelProvider](../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model-provider/index.md)> | ||
|
||
A [ProvidableCompositionLocal](https://developer.android.com/reference/kotlin/androidx/compose/runtime/ProvidableCompositionLocal.html) of [ViewModelProvider](../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model-provider/index.md). This allows a parent composable function to provide a [ViewModelProvider](../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model-provider/index.md) which can then be obtained from a child composable function. |
Oops, something went wrong.