I have write my own view Bar, which extends LinearLayout. My bar has two places for add buttons or other view. Now I add items to my Bar using code, like:
bar.addItemToLeft(view); or
bar.addItemToRight(view);
I would like to make my Bar able to accept childs view in xml like LinearLayout.
For example:
<com.my.ui.Bar
android:id="@+id/bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<com.my.ui.BarLeft
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<View/> <View/> <View/>
</com.my.ui.BarLeft>
<com.my.ui.BarRight
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<View/> <View/> <View/>
</com.my.ui.BarLeft>
</com.my.ui.Bar>
Is it possiable to do?
PS:

You bar left and right bar must extend a ViewGroup (LinearLayout, relativeLayout) to be able to accpet childs.
regards,
Aqif Hamid