0

I have a very simple widget with the following layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@layout/myshape" >

    <TextView
         android:id="@+id/tvTime"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:gravity="center_horizontal|center_vertical"
         android:textColor="#FFFFFF" />
</LinearLayout>

As far as I know the TextView should be as large as the widget (e.g. widget 2x1, 1x1...). Instead the text size doesn't change at all. Can any one tell me where the problem is? thanx in advance.

Willis
  • 5,308
  • 3
  • 32
  • 61
Patrick
  • 3,073
  • 2
  • 22
  • 60
  • there is no problem :). Android dont change 'textSize' to fit the TextView width/height. This, can probably interest you => http://stackoverflow.com/questions/5033012/auto-scale-textview-text-to-fit-within-bounds – Neige Jan 15 '15 at 15:21
  • Thanx for the help Neige. So if I'm not mistaken Android changes the TextView size according to the widget size but the textSize remains the same. Is this correct?! If so quite ackward isnt' it? – Patrick Jan 16 '15 at 08:18
  • In any case THAT WORKED THANX!! – Patrick Jan 16 '15 at 08:39

0 Answers0