Spinner Animation Burst

An attempt to implement animation in the following link https://dribbble.com/shots/1753718-Chat-Screen-UX-UI-iOS-App . Attaching what we have tried so far below. Unable to play the animation accurately. Share your ideas on how to implement it.

    @Override
    public View getDropDownView(int position, View convertView, ViewGroup parent) {
        ViewHolder viewHolder;
        View view = convertView;
        if (view == null) {
            viewHolder = new ViewHolder();
            view = mInflater.inflate(R.layout.rowlayout, null);
            viewHolder.textView = (TextView) view.findViewById(R.id.textView);
            view.setTag(viewHolder);
        } else {
            viewHolder = (ViewHolder) view.getTag();
        }

        viewHolder.textView.setText(mItems.get(position));
        animate(view, position);
        return view;
    }


     private void animate(View target, int index){

        Animation animtopOut = AnimationUtils.loadAnimation(mContext, R.anim.slide_top_to_bottom);
        animtopOut.setStartOffset(index * 100);
        target.startAnimation(animtopOut);
  }

Attaching an Animation Resource File

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/accelerate_interpolator">
    <translate android:fromYDelta="-100%" android:toYDelta="0"
        android:duration="100" />
    <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
        android:duration="500" />
</set>
+4
source share
1 answer

To my mind:

  • You need to disable the spinner popup animation style.
  • Apply animation to each list item in the drop-down list.

, -90 0 x, , ViewPropertyAnimator.rotationX( float) ViewPropertyAnimator.rotationXBy( float) x , y 0, .

0

All Articles