title: How to reuse components?
body: <p>I create an UI for my Android app. I use Android Studio, java and xml.</p>
  
  <p>I designed a generic button component that looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/2dfev.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2dfev.png" alt="enter image description here"></a></p>
  
  <p>One should be able to configure text colour, icon (image) and button text of this button.</p>
  
  <p>Then I want to take this button component and create a navigation bar component that consists of two buttons:</p>
  
  <p><a href="https://i.stack.imgur.com/S4MJ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S4MJ8.png" alt="enter image description here"></a></p>
  
  <p>Finally I want to take the navigation component, configure icons, text colours and texts for buttons and use it in my activity's layout to have a navigation bar like this:</p>
  
  <p><a href="https://i.stack.imgur.com/cwyRW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cwyRW.png" alt="enter image description here"></a></p>
  
  <p>Can you please show me an example how we can I achieve this? I have some experience with Qt Quick and creating components like this in Qt Quick is so easy and straightforward. I hope something similar is achievable also with Android's xml.</p>
  
  <p>I spent an hour trying to create this using include tag and data binding, without any luck. </p>