K
K
Konstantin Dovnar2017-03-16 14:34:31
Android
Konstantin Dovnar, 2017-03-16 14:34:31

Bind TextView and variable?

Is it possible to somehow bind the value of some variable in the code to the TextView?
That is, so that when this variable changes, the text in the TextView will automatically change as well?
Or just manually use textView.setText() each time?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tiberal, 2017-03-16
@SolidlSnake

https://developer.android.com/topic/libraries/data...

D
davidnum95, 2017-03-17
@davidnum95

DataBinding has a very convenient two-way binding, just for such cases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question