を拡張する独自のビューバーを作成しましたLinearLayout
。私のバーには、ボタンやその他のビューを追加するための2つの場所があります。次に、次のようなコードを使用してバーにアイテムを追加します。
bar.addItemToLeft(view);
また
bar.addItemToRight(view);
私のバーが。のようなxmlでチャイルズビューを受け入れることができるようにしたいと思いLinearLayout
ます。
例えば:
<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>
することは可能ですか?
PS: