android - ViewFlipper with just one view -
i have viewflipper contains linearlayout contains textviews.
when go previous or next item (textviews updated other values), want viewflipper full animation. example fade_in, fade_out.
for example:
<viewflipper android:id="@+id/viewflipper01" android:layout_width="wrap_content" android:layout_height="wrap_content" > <linearlayout android:id="@+id/linearlayout1" android:layout_width="320dp" android:layout_height="435dp" android:background="@drawable/ic_launcher" android:orientation="vertical" > <textview android:id="@+id/textview01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="flipper content 1" > </textview> </linearlayout> </viewflipper>
when click on next textview01, want change value flipper content 2 full animation. example, flipper content 1 gets out left flipper content 2 comes in right.
if understood question properly. in part create screen should acquire viewflipper object , set inanimation , outanimation
viewflipper viewflipper01 = (viewflipper)findviewbyid(r.id.viewflipper01); viewflipper01.setinanimation(animationutils.loadanimation(this.getactivity(), android.r.anim.fade_in)); viewflipper01.setoutanimation(animationutils.loadanimation(this.getactivity(), android.r.anim.fade_out));
hope helps , enjoy work.
Comments
Post a Comment