Its very common in the UI design that some common element appear many time.
Just like some common signature in all the activities (pages) and all.
Its common that we need to set some component as reusable component.
In this case we can use the. This element does exactly what its name suggest.
To use this is very simple
Declare the reusable component as one layout in the /res/layout, let say commonlayout.xml
Then where ever you need to refer this you can use the following code
Just like some common signature in all the activities (pages) and all.
Its common that we need to set some component as reusable component.
In this case we can use the
<include />
tagTo use this is very simple
Declare the reusable component as one layout in the /res/layout, let say commonlayout.xml
Then where ever you need to refer this you can use the following code
<include android:id="@+id/id" layout="@layout/commonlayout"/>
- Here you can override all the layout parameters. This means that any
android:layout_*
attribute can be used with the<include />
tag - If you want to override the layout dimensions, you must override both
android:layout_height
andandroid:layout_width
you cannot override only the height or only the width. If you override only one, it will not take effect. (Other layout properties, such as weight, are still inherited from the source layout.)
This comment has been removed by the author.
ReplyDeletenice
ReplyDeletebut it's so short for beginners to understand easily
plz add some eyample link with it
The 7 best Indian casino-casinos in New York (NY) - Mapyro
ReplyDeleteThe 7 전주 출장마사지 best Indian casino-casinos in New York (NY). Map. 경상북도 출장샵 3. Best Indian casino-casinos in New York 김포 출장안마 (NY). Map. 3. Best Indian 의정부 출장마사지 casino-casinos in New 고양 출장샵 York (NY). Map. 4. Best Indian casino-casinos in