PROBLEM
I want to make my TextView look like below pic, is it possible ?
please advice, Thank !
NOTE
when I use spannable and set ° to become small, its height is place at the middle of 20.
However, I can't make C and ° in the same vertical.
PROBLEM
I want to make my TextView look like below pic, is it possible ?
please advice, Thank !
NOTE
when I use spannable and set ° to become small, its height is place at the middle of 20.
However, I can't make C and ° in the same vertical.
Try this:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="70dp" >
<TextView
android:id="@+id/deg_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="20"
android:textSize="65sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="70dp"
android:orientation="vertical" >
<TextView
android:id="@+id/deg_symbol"
android:layout_width="30dp"
android:layout_height="35dp"
android:gravity="top|center_horizontal"
android:text="°"
android:textSize="70sp"
android:textStyle="bold" />
<TextView
android:id="@+id/deg_units"
android:layout_width="30dp"
android:layout_height="35dp"
android:gravity="bottom|center_horizontal"
android:text="C"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>