All Questions
Tagged with android-jetpack android-databinding
42
questions
0
votes
1
answer
22
views
cannot find symbol class ActivityMainBindingImpl
I am currently learning about Data binding and I did exactly as the tutorial but I keep getting the error "error: cannot find symbol class ActivityMainBindingImpl" when I run the app no ...
0
votes
1
answer
888
views
On Click event Does not working with Data Binding in Android Studio
I am learning DataBinding in android studio. But I am facing a problem with binding a ModelView. I want to bind a function with a button on click event. I set a function in the model view. I want to ...
0
votes
0
answers
482
views
What is the right way to access activity context from the ViewModel?
This is not a question to solve an error, I just want to make sure I am going for the right approach and not introducing any memory leaks and all.
I'm using DataBinding with ViewModel the view model ...
0
votes
1
answer
142
views
BindingAdapter with drawable parameter not accepting drawable parameter
BindingAdapter code:
@BindingAdapter(value = ["vertical_divider_decorator_drawable"], requireAll = false)
@JvmStatic
fun bindRecyclerViewDivider(recyclerView: RecyclerView, ...
1
vote
1
answer
486
views
View Binding Both Activity and Bottom Bar
I am setting up View Binding in my project, and I ran into an issue. I tried to look for documentation regarding this under without luck.
I have my activity, and I have set up View Binding for this:
...
3
votes
1
answer
406
views
Data binding with RecyclerView not rendering correclty
I am trying to use data binding with RecyclerView. I set up a simple application that shows the numbers 1 to 50, one on each row, in a RecyclerView. And I want to use data binding to each row.
Here is ...
1
vote
0
answers
1k
views
How to set adapter for recyclerview with Databinding
I want to use databinding for recyclerview. I created a model with BindignAdapter annotation. But after that I don't know what should I do and I didn't find any solution.
I want to set some data for ...
1
vote
0
answers
802
views
When to use viewDataBinding.invalidateAll()
I was trying to see when binding.invalidateAll() is needed to refresh the UI when the data changes.
I have 2 examples where I change the data, in one of them the UI data changes automatically and in ...
5
votes
0
answers
2k
views
Android Talkback accessibility loosing focus after introducing databinding
My team is re-architecting an existing MVC based code to MVVM with LiveData, BaseObservable (for Bindable fields) and Navigation Component.
Earlier we had all activities with header fragment as ...
0
votes
1
answer
518
views
Control UI visibility on Recycler View item via DataBinding
I am learning MVVM with data binding in Android and got stuck on maintaining UI visibility state of items in the recycler view. Each item sell has 2 text view - title(visible) & description(hidden)...
0
votes
1
answer
153
views
DataBinding in Anroid RecyclerView doesn't work (Kotlin)
Here's my OnBindViewHolder function code:
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val country = countries[position]
var countryInfoCardBinding = DataBindingUtil....
1
vote
2
answers
1k
views
Android MaterialButtonToggleGroup onButtonChecked DataBinding Not Supported
I want to use DataBinding on the MaterialButtonToggleGroup with MaterialButton, however it seems like there is no onButtonChecked attribute for MaterialButtonToggleGroup:
<com.google.android....
1
vote
1
answer
688
views
How to update custom view data to data binding?
I'm trying to update custom view data to data binding (Jetpack).
The custom view has attributes so I was making ViewBindingAdapter.
But, That's update only one time on Activity onCreate or init ...
4
votes
2
answers
3k
views
Kotlin “toString()” Not Available in Android DataBinding
Just learned DataBinding and find out that the powerful built-in toString() from Kotlin is not available:
<layout
xmlns:android="http://schemas.android.com/apk/res/android">
&...
1
vote
1
answer
2k
views
Data Binding and: Input field validation and manipulation; Activity/Fragment Navigation
I am currently learning data binding and all the new things that come with it. At the moment I am struggling quite a bit with how to properly implement things, so asking for some help.
In this ...