M
M
Maxim Siomin2021-05-19 20:07:00
Android
Maxim Siomin, 2021-05-19 20:07:00

Which binding is better to use?

import kotlinx.android.synthetic.main.fragment_main.*
textViewNumber.text = "10"

Or
val binding = DataBindingUtil.inflate(
            inflater, R.layout.fragment_main, container, false)
binding.number = "10"

<data>
        <variable
            name="number"
            type="String" />
    </data>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question