Kotlin: saving ObservableField state error
See original GitHub issueHi,
in Kotlin I have a field like this:
@State var email: ObservableField<String> = ObservableField()
When I try to compile the code I get an error like this:
Error:(57, 51) error: incompatible types: String cannot be converted to ObservableField<String>
And the affected generated code looks like this:
@Override
@SuppressWarnings("unchecked")
public void restore(T target, Bundle state) {
target.setEmail(HELPER.<String>getSerializable(state, "Email"));
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Work with observable data objects | Android Developers
Observability refers to the capability of an object to notify others about changes in its data. The Data Binding Library allows you to...
Read more >Databinding - ObservableField<String> not updating view
I'm using MVVM architectural pattern. When ViewModel receives callback with fetched data I set it up to an ObservableField. Unfortunately it ...
Read more >Advanced Data Binding in Android: Observables
Learn how to use the Data Binding Library to bind UI elements in your XML layouts to data sources in your app using...
Read more >Simplifying UI States with Kotlin Sealed Classes and Data ...
To expose this state to our Binding object, or any other necessary observers, we rely on an ObservableField . Once our data has...
Read more >Binding Adapters and Observable Objects | by Oya Canlı
In Kotlin, you can write your binding adapters as extension functions as well. ... states of the progress bar, recyclerview and error image, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is working fine now with the updated library, thank you very much. 😃
On Wed, Jun 21, 2017 at 9:30 PM Ralf Wondratschek notifications@github.com wrote:
Released: https://github.com/evernote/android-state/releases/tag/v1.1.1