A (175)

(Tuis.) #1

210 CHAPTER 6: Android Screen Design: Writing to the Display Using Activity and View


Upon closer examination, it looks like Android is using “exponential” numeric representation for the
population numeric data value. Instead of 1,967,387,132, or even 1967387132, Android is writing
1.967387132E9, part of which is wrapping to the next line.


To fix this, we will need to move the second nested (right side data values) LinearLayout container to
the left, so that this long value will not wrap.


Since there is no margin parameter defined inside your second nested LinearLayout, it must be
the android:layout_marginLeft parameter DIP value in the first (title) that is pushing the
second nested LinearLayout to the right, so let’s reduce this by 20 DIP from a value of 48dip to a
value of 28dip.


As you can see in Figure 6-40, the android:layout_marginLeft parameter value has been reduced
to 28dip, fixing the problem with the Galaxy Information Screen in the first nested


container, pushing the second nested container too far over to the
right, causing the wrapping.

Figure 6-39. The TextView UI objects displaying the Galaxy object data values; fine-tuning the margins

Free download pdf