2

In android L calculator app when you try too add more than ten digits Text size changes with a cool animation. so Text/Font size goes smaller and you can fit more digits
How can I do that ?

[UPDATE]
As shown in this Video

9patchcoder
  • 619
  • 1
  • 5
  • 17

2 Answers2

1

Try these properties. Should be anyone from this.

    android:translationX=""
    android:translationY=""
    android:transformPivotX=""
    android:transformPivotY=""
    android:scaleX=""
    android:scaleY=""
intrepidkarthi
  • 3,104
  • 8
  • 42
  • 75
1

for the Animation use this example :

TextView Animation Size

do it in the Callback onTextChanged which occurs when you Type a char in the View

Hope it helps.

also you can use the same Animation to EditText but use this Example for this : EditText addTextChangeListener

Community
  • 1
  • 1
Itzik Samara
  • 2,278
  • 1
  • 14
  • 18