Code A can work well, I don't know why Code b can't work, could you tell me ?
Code A
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="androidx.lifecycle.LiveData" />
<variable
name="MyValue1"
type="LiveData<Integer>" />
</data>
...
Code B
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="androidx.lifecycle.LiveData" />
<variable
name="MyValue2"
type="LiveData<Int>" />
</data>
...
from Why can't I define type="LiveData<Int>" in Android Studio?
No comments:
Post a Comment