MuhammedRefaat
Lurker
I'm using a sidebar into my android app, this app required to run on from 7' to 10' android tablets, the problem is the side bar gives me different behaviors with the different sizes, look at the following pics:
with 7':
with 10':
and that happens with either fixing the sidebar size, making it in a specific range, or giving it the freedom to fit.
My code:
[HIGH]<LinearLayout
android:id="@+id/bottom_of_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_weight="3"
android
rientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:text="Dimming Control"
android:layout_weight="1"
android:textColor="@android:color/white"
android:layout_gravity="left"
android:layout_marginLeft="20dp" />
<LinearLayout
android
rientation="vertical"
android:layout_width="400dp"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_gravity="left"
android:layout_marginBottom="2dp"
android:layout_marginLeft="20dp"
android
addingLeft="1dp"
android
addingRight="1dp"
android
addingTop="2dp"
android
addingBottom="2dp"
android:gravity="center"
android:background="@drawable/light_dimmingbg">
<SeekBar
android:id="@+id/seekbar"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="left"
android:layout_weight="2"
android:layout_marginBottom="2dp"
android:layout_marginRight="20dp"
android:layout_marginTop="2dp"
android:layout_marginLeft="20dp"
android:max="100"
android:minHeight="10dp"
android:maxHeight="13dp"
android:minWidth="120dp"
android
rogress="20"
android:thumb="@drawable/light_sliderhandle"
/>
</LinearLayout>
</LinearLayout>[/HIGH]
with 7':
with 10':
and that happens with either fixing the sidebar size, making it in a specific range, or giving it the freedom to fit.
My code:
[HIGH]<LinearLayout
android:id="@+id/bottom_of_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_weight="3"
android
rientation="vertical" ><TextView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:text="Dimming Control"
android:layout_weight="1"
android:textColor="@android:color/white"
android:layout_gravity="left"
android:layout_marginLeft="20dp" />
<LinearLayout
android
rientation="vertical"android:layout_width="400dp"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_gravity="left"
android:layout_marginBottom="2dp"
android:layout_marginLeft="20dp"
android
addingLeft="1dp"android
addingRight="1dp"android
addingTop="2dp"android
addingBottom="2dp"android:gravity="center"
android:background="@drawable/light_dimmingbg">
<SeekBar
android:id="@+id/seekbar"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="left"
android:layout_weight="2"
android:layout_marginBottom="2dp"
android:layout_marginRight="20dp"
android:layout_marginTop="2dp"
android:layout_marginLeft="20dp"
android:max="100"
android:minHeight="10dp"
android:maxHeight="13dp"
android:minWidth="120dp"
android
rogress="20"android:thumb="@drawable/light_sliderhandle"
/>
</LinearLayout>
</LinearLayout>[/HIGH]