Landscape Layout behaving differently in Android device


#1

Hi,

I followed the steps in Listing 3.4 Tweaking the landscape layout (layout-land/activity_quiz.xml)

My code from activity-land/activity_quiz.xml

<FrameLayout xmlns:android=“http://schemas.android.com/apk/res/android"
android:id=”@+id/FrameLayout1"
android:layout_width="match_parent"
android:layout_height=“match_parent”

          >

<TextView
android:id="@+id/question_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding=“24dp”

      />

 <Button 
     android:id="@+id/true_button"
     android:layout_width ="wrap_content"
     android:layout_height ="wrap_content"
     android:text="@string/true_button" />
 
 <Button
     android:id="@+id/false_button"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:text="@string/false_button" />

<ImageButton
android:id="@+id/prev_button"
android:layout_width="wrap_content"
android:layout_height=“wrap_content"
android:src=”@drawable/arrow_left"
android:contentDescription=“random”

            />

After making the changes and I tested it on emulator and as well as with my Tab (Galaxy Tab 2).

In Emulator, the layout is working as expected but when I ran it in my device I get the following Red colored lines in my logcat whenever I change the screen orientation.

Not sure whether the below lines are exceptions or not, as they don’t seem to kill the flow or stop the application.

“06-17 08:00:06.437: E/SpannableStringBuilder(18934): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length”

Has anyone seen this ?