I cannot figure out why the Graphical-layout does not show all texts in the below xml file.
I do see the “X”, I see my background icon, I see the content of “@string/remaining” in the emulator, “@dimen/*” are defined and not equal to 0 and no warning/error is reported from the xml file checker (I am using Eclipse).
In the graphical layout, neither “@string/remaining” nor “99” appear.
Purpose of this xml file is to design a gridView cell, representing a Scrabble(R) letter, and how many of them have not been played yet. So there will be more or less 26 of these cells in my main activity.
Values:
@string/remaining = "Left: "
@dimen/ic_size = 68px
@dimen/remaining_size = 12dip
@dimen/coin_size = 14dip
gridcell.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/ic_size"
android:layout_height="@dimen/ic_size"
android:background="@drawable/ic_empty_coin"
android:orientation="vertical">
<TextView
android:id="@+id/lbl_Cell_Letter"
android:layout_width="@dimen/ic_size"
android:layout_height="wrap_content"
android:gravity="center_horizontal|top"
android:textColor="#000000"
android:textSize="@dimen/letter_size"
android:text="X"
android:textStyle="bold"/>
<LinearLayout
android:layout_width="@dimen/ic_size"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:textColor="#000000"
android:textSize="@dimen/remaining_size"
android:textStyle="italic"
android:text="@string/remaining"/>
<TextView
android:id="@+id/lbl_Cell_Number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="#000000"
android:textSize="@dimen/coin_size"
android:text="99"
android:textStyle="italic" />
</LinearLayout>
</LinearLayout>
Any idea?!
in the emulator, I do not get what I expect… otherwise I would not even care what I see in the Graphical-layout!
This is my first question on stackOverflow, please be nice with me! 🙂
Thomas.
It’s one of the long standing bugs in the Graphical layout.
You have to remove italics to see it in the Graphical Layout (a major annoyance).