I have a horizontal linear layout separated with lines like the
following:
<View
android:background="@drawable/gradient_white2"
android:layout_height="fill_parent"
android:layout_width="1dip"
/>
In the layout editor, the lines have the same width, however, on the
device they do not - the second line in the layout below is slightly
wider than the other two. I'm wondering if there is an explanation for
this or a way around it.
Here is what the layout looks like:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:background="@drawable/customized_title_bar_button"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="horizontal"
>
<ImageButton
android:background="@drawable/customized_title_bar_button"
android:id="@+id/home"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:src="@drawable/header_logo_small"
/>
<LinearLayout
android:background="@drawable/gradient_shape_blue"
android:gravity="right|center"
android:layout_weight="1"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:orientation="horizontal"
>
<View
android:background="@drawable/gradient_white2"
android:layout_height="fill_parent"
android:layout_width="1dip"
/>
<ImageButton
android:background="@drawable/customized_title_bar_button"
android:id="@+id/map"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:src="@drawable/globe_icon"
/>
<View
android:background="@drawable/gradient_white2"
android:layout_height="fill_parent"
android:layout_width="1dip"
/>
<ImageButton
android:background="@drawable/customized_title_bar_button"
android:id="@+id/saved"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:src="@drawable/saved_icon"
/>
<View
android:background="@drawable/gradient_white2"
android:layout_height="fill_parent"
android:layout_width="1dip"
/>
<ImageButton
android:background="@drawable/customized_title_bar_button"
android:id="@+id/search"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:src="@drawable/search_icon"
/>
</LinearLayout>
</LinearLayout>
Thanks,
Mike
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en