I want to create a horizontal linearlayout with two button and one imageview such that all three elements occupy equal amount of space.For that i have set android:layout_weight="1"
in all the three elements.Still i see space occupied by all three elements is different with middle element with largest space then the third and first one with smallest.
<LinearLayout
android:id="@+id/footerpreview"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:visibility="visible"
>
<ImageView
android:id="@+id/face"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:src="@drawable/face"
android:background="#2D4487"
android:gravity="center"
android:padding="10dp"
/>
<ImageView
android:id="@+id/gyee"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:src="@drawable/gyee"
android:background="#469AEB"
android:gravity="center"
android:padding="10dp"
/>
<Button
android:id="@+id/submit"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Submit"
android:textSize="18dp"
android:textColor="#FFFFFF"
android:gravity="center"
android:layout_gravity="center"
android:background="#F3931D"/>
</LinearLayout>