Why don't you use a RelativeLayout
with alignParentLeft
and alignParentRight
attributes? I think it would be simpler and use lesser number of LayoutManagers. Something like the following: Note that this assumes the height of the row as 50dip and that of both the images as 50x50 dip.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="50dip"
android:layout_width="fill_parent"
android:layout_weight="0">
<ImageView
android:layout_height="50dip"
android:layout_width="50dip"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_centerInParent="true"
android:text="some text"/>
<ImageView
android:layout_height="50dip"
android:layout_width="50dip"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"/>
</RelativeLayout>
Samuh
2010-01-14 05:01:50