Hello, It is not enough to use a single TextView for the effect you need. You should rather use TextSwitcher class. Take a look at SDK samples. There is com.example.android.apis.view.TextSwitcher1 class there. It is good demonstration of using TextSwitcher class.
Hope this helps. On Jan 10, 8:07 am, g1bb <corymgibb...@gmail.com> wrote: > Hello, > > I'm working on sometextanimationwith 2 left and right buttons, > iterating through an array, and scrolling thetextoff of the screen > (so left button scrolls thetextoff the screen to the left, and vice- > versa). > > The problem I'm finding, is that I want to keep the currenttextuntil > theanimationhas been completed, and _then_ change thetext(next > item in the array), but thetextseems to change first, and then > scroll. > > Here's my XML foranimation(R.anim.anim_left): > <?xml version="1.0" encoding="utf-8"?> > <set xmlns:android="http://schemas.android.com/apk/res/android" > android:shareInterpolator="true" android:interpolator="@android:anim/ > accelerate_interpolator"> > > <translate android:fromXDelta="0" > android:toXDelta="250" > android:duration="400" > android:fillAfter="false"/> > </set> > > And the code for the button: > if (v == btnLeft) { > TextView animWindow = (TextView)findViewById(R.id.txtScroll);Animationanim = > AnimationUtils.loadAnimation(Main.this, > R.anim.anim_down); > animWindow.startAnimation(anim); > > final ArrayAdapter<String> namesArray = new ArrayAdapter<String> > (Main.this, R.array.myArray, getResources().getStringArray > (R.array.myArray)); > setListAdapter(Names); > Names -= 1; > txtNames.setText(namesArray.getItem(Names)); > } > > Has anyone else experienced something similar to this, or have any > ideas? > > Thanks much in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---