sunflower icon indicating copy to clipboard operation
sunflower copied to clipboard

Dynamic views using databinding

Open djmalkar opened this issue 6 years ago • 1 comments

Can we create n no of edittext (provided by user) and inflate them in our layout using data binding? If so then how can we create observableFields for those dynamic views?

djmalkar avatar Aug 17 '18 04:08 djmalkar

You can't actually inflate n no of EditText in the xml layout file using databinding, bindings are generated in compile time. My suggestion is use a RecyclerView to show n no of fields or you can programmatically generate the UI if the value of n is small.

AnwarShahriar avatar Aug 28 '18 02:08 AnwarShahriar