私は同じビューに対して 2 つの変換アニメーション クラスを持っています。今必要なのは、別のタッチを使用して非表示/表示するビューが必要なことです。1 つのアニメーションだけをまとめると、両方のアニメーションが別のタッチで作業する必要があります。これが私のコードです。
ln.setOnTouchListener(new View.OnTouchListener() 
        {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) 
            {
                if(motionEvent.getAction() == MotionEvent.ACTION_DOWN)
                {
                    Animation animation = new TranslateAnimation(0,-200,0, 0);
                    animation.setDuration(2000);
                    animation.setFillAfter(true);
                    lv.startAnimation(animation);
                    lv.setVisibility(0);
                    }
                    else
                    {
                     Animation animation = new TranslateAnimation(-200,0,0, 0);
                        animation.setDuration(3000);
                        animation.setFillAfter(true);
                        lv.startAnimation(animation);
                      lv.setVisibility(0);
                }
                return true;
            }
        });
    }
これを参照しましたが、まだ問題に直面しています。誰でもこれを解決する方法を教えてもらえますか。