Scaling animation for entire text view android -


i have text view background color. want enlarge/project whole view using animation. tried scale animation text gets enlarged.i want whole view enlarged. animation should use attain this? provide suggestions.

add textview relative layout.and apply animation layout.

xml:

<relativelayout     android:layout_width="300dp"     android:id="@+id/mylayout"     android:layout_height="50dp"     android:layout_alignparenttop="true"     android:layout_centerhorizontal="true"     android:layout_margintop="218dp"     android:background="#000" >      <textview         android:id="@+id/textview1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_centerhorizontal="true"         android:layout_centervertical="true"         android:text="textview"         android:textcolor="#fff" />  </relativelayout> 

java:

scaleanimation animation = new scaleanimation(fromxscale, toxscale, fromyscale, toyscale, animation.relative_to_self, (float)0.5, animation.relative_to_self, (float)0.5);  relativelayout rl=(relativelayout)findviewbyid(r.id.mylayout);  rl.startanimation(animation); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -