Custom controls and include usage scenarios

has been working on custom controls for Android recently.
for example, when you customize the navigation bar, you can:

  1. first define a navigation item containing pictures and text
  2. After
  3. , use the package name in the main navigate view, set each item attribute, do namespaces, and so on.

the include layout is not used here.
secondly, I read this tutorial and tried to copy a common top (title bar) layout:

Android development-load a common layout (such as a common title bar) , this can also be developed in the form of custom controls, but this is not done here (set using the typedarray structure and defining the attrs property), but inside:

  1. include layout is used
  2. The
  3. Java file doesn"t involve more logic, just init.

in what scenarios can I use include in a custom control? And custom controls?
are there any repetitions of these two usage scenarios?
it is currently known that include can be xml multiplexed in the same layout, and the same layout is also switched when switching, but if you put it in the main view, other layouts attached to it will be messed up.

the current project requirement is to try the above tutorial according to the switching setting of different text in the main view, but it cannot be realized. Currently, we are using typedarray structure and defining attrs property to set it in "custom control", and then write logic)

attach a link to my notes:
Whisperbird-her Bay-Android Learning Notes-compound controls


as long as it is ViewGroup , you can include include .

if the custom view is ViewGroup rather than simple View , then you can include include

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9ac3a-2f214.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9ac3a-2f214.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?