In general, when customizing a control panel and this control has a custom property (for example:panel:closedhandle= "@drawable/foot_bar_right"), you need to define a reference address for this control in the XML ( Example:xmlns:panel= "Http://schemas.android.com/apk/com.example.view")
This allows you to reference your custom control in XML.
<relativelayout xmlns:android= "Http://schemas.android.com/apk/res/android"//the package name where the panel resides xmlns:panel= "Http://schemas.android.com/apk/com.example.view"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent" >//Custom Control Panel<Com.example.view.Panel Android:id= "@+id/panel"Android:layout_width= "Fill_parent"Android:layout_height= "Wrap_content"Android:layout_alignparentbottom= "true"android:layout_gravity= "Left"panel:closedhandle= "@drawable/foot_bar_right"panel:content= "@+id/panelcontent"Panel:handle= "@+id/panelhandle"Panel:openedhandle= "@drawable/foot_bar_left"panel:position= "Left" > </com.example.view.Panel>
But
When you want to reference a custom control that is a library , and this control also has a custom property, such as on (it has custom properties in Attrs.xml), you cannot reference the package name in the XML when it is referenced in the new project.
Instead, quote:xmlns:panel= "Http://schemas.android.com/apk/res-auto"
<relativelayout xmlns:android= thepackage name where the "Http://schemas.android.com/apk/res/android"//panel is located Xmlns:panel= "Http://schemas.android.com/apk/res-auto" android:layout_width= "Match_parent" Android : layout_height= "Match_parent" >//Custom Control Panel <com.example.view.panel android:id= "@+id/ Panel " android:layout_width=" fill_parent " android:layout_height=" wrap_content " android:layout_ Alignparentbottom= "true" android:layout_gravity= "left" panel:closedhandle= "@drawable/foot_bar_right" panel:content= "@+id/panelcontent" panel:handle= "@+id/panelhandle" panel:openedhandle= "@ Drawable/foot_bar_left " panel:position=" left "> </com.example.view.Panel>
Reference Library-a library package with custom controls for custom properties