TextView line bounds and orientation change mismatched values of bounds
when landscape
I have a confusing problem with my textview, after orientation change:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:text="Simple"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:background="@drawable/my_color_drawable"
android:id="@+id/text1"
android:layout_gravity="center"/><\FrameLayout>
when i start app in landscape mode the method getLineBounds(1,tmpRect)
results in:
tmpRect.top = 69
then I change my phone orientation to portrait and results are:
tmpRect.top = 76
Hovewer after changing back to landscape the results is set to
74(previosuly 69), and both results doesnt change from now on.
The results are 76 and 74 for when starting app in portrait mode.
I'm really curious why is that happening that numbers are diffrent when
started in landscape and I will appreciate any help.
Info: my activity have set android:screenOrientation="sensor"
Thanks.
No comments:
Post a Comment