Can't get precise layout on Nexus One
- by Johnny
I want to use precise layout on Nexus One, my code is like this:
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="90px">
<ImageView
android:layout_width="5px"
android:layout_height="fill_parent"
android:src="@drawable/d10" />
<ImageView
android:layout_width="94px"
android:layout_height="fill_parent"
android:src="@drawable/d5" />
<ImageView
android:layout_width="94px"
android:layout_height="fill_parent"
android:src="@drawable/d6" />
<ImageView
android:layout_width="94px"
android:layout_height="fill_parent"
android:src="@drawable/d7" />
<ImageView
android:layout_width="94px"
android:layout_height="fill_parent"
android:src="@drawable/d8" />
<ImageView
android:layout_width="94px"
android:layout_height="fill_parent"
android:src="@drawable/d9" />
<ImageView
android:layout_width="5px"
android:layout_height="fill_parent"
android:src="@drawable/d10" />
But it turns out on Nexus One, the screen width is not 480 px. So this LinearLayout will exceed the screen width.
How should I fix this?