I am new to android development . I am trying to make a timer app . My UI has 11 buttons from 0-9 , a 00 button and a backspace button . The initial format of my textview will be like "00h 00m 00s" . When a user type input like "123" the textview should change from right to left like "00h 01m 23s" . I cant figure out how to do this. It should take input like google clock app GOOGLE CLOCK APP
PLS WRITE CLEAR CODE IN JAVA .
I tried using three textview for h , m and s . I used SpannableStringBuilder to reduce the size of h , m and s . i was expecting it to replace zeros in the text view but it is removing it and writing new number . in short i am messed up.

First Method:
Try using Strings features (I haven't tested):
Second Method:
You can add an extra
TextViewaligned in Right (End) Bottom of eachTextViewof smaller size both inside aRelativeLayout.