How do I use tools:
xmlns:tools="http://schemas.android.com/tools"
With <include>
?
I have a layout A
that I use tools to populate all the text fields with test data. And I have layout B
that use include
to copy layout A in to it. How ever when I do that I do not see the test data of A
.
How can I see the test data of A
included in B
?
*Both layouts have xmlns:tools="http://schemas.android.com/tools
, I even pushed it to layout tag.
Check this link, Android tools attributes. It should give you an idea as to how to use the tools attributes. Specifically look at the
tools:showIn
attribute. It basically allows you to render layout_A in layout_B, in which layout_B has<include layout="@layout/layout_A"/>
somewhere in the xml.Here's an example:
layout_A
layout_B