Dynamically add new View through data binding

Updated 3 February 2017


This is not best practice to add a view dynamic time through data binding, but if we want to add a view more time in more places then we can use to add view through Data Binding.


. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • Chirag
    What should we do if we need to add multiple textviews?
  • jrh
    Please share the sample project
    • ashwini gupta (Moderator)
      sorry, I can’t share source code because I have deleted the Sample code. what issues are you facing to create dynamically creating a view? Please explain.
      • mochadwi
        app:addDynomicView, is this your custom databinding adapter? would you mind giving us the example of databinding adapter class of yours?
        • ashwini gupta (Moderator)
          Yes, It is a custom data-binding adapter, that holds two-parameter one LinearLayout and second TextView. we don’t share source code due to company policy.
          What you facing the issue, please explain or share your code so that I can verify your point.
  • Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home