-
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.
coroutines.Flow support, restoring subscriptions after component reat…
…tach
- Loading branch information
1 parent
8b36933
commit d979d27
Showing
7 changed files
with
146 additions
and
64 deletions.
There are no files selected for viewing
16 changes: 15 additions & 1 deletion
16
app/src/main/java/ru/impression/ui_generator_example/Ext.kt
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 |
---|---|---|
@@ -1,14 +1,28 @@ | ||
package ru.impression.ui_generator_example | ||
|
||
import android.view.View | ||
import androidx.core.view.isGone | ||
import androidx.core.view.isInvisible | ||
import androidx.core.view.isVisible | ||
import androidx.databinding.BindingAdapter | ||
|
||
object DataBindingExt { | ||
|
||
@JvmStatic | ||
@BindingAdapter("isInvisible") | ||
fun setIsVisible(view: View, value: Boolean) { | ||
fun setIsInvisible(view: View, value: Boolean) { | ||
view.isInvisible = value | ||
} | ||
|
||
@JvmStatic | ||
@BindingAdapter("isVisible") | ||
fun setIsVisible(view: View, value: Boolean) { | ||
view.isVisible = value | ||
} | ||
|
||
@JvmStatic | ||
@BindingAdapter("isGone") | ||
fun setIsGone(view: View, value: Boolean) { | ||
view.isGone = value | ||
} | ||
} |
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
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
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
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
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
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