Android Animation重叠底部导航控制栏

时间:2020-09-26 07:50:43

标签: android transition

我有上下滑动动画,它的底部导航栏重叠。我只是创建了一个新应用,而没有其他更改

slide_down_info

<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
    android:duration="500"
    android:fromYDelta="0%p"
    android:toYDelta="100%p" />

slide_up_info

<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
    android:duration="500"
    android:fromYDelta="100%p"
    android:toYDelta="0" />

主要活动

texttest.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            startActivity(new Intent(MainActivity.this, secondActivity.class));
            overridePendingTransition(R.anim.slide_up_info,R.anim.no_change);
        }
    });

secondActivity

 @Override
public void onBackPressed() {
    super.onBackPressed();
    Log.e("TAG", "onBackPressed: " );
    overridePendingTransition(R.anim.no_change,R.anim.slide_down_info);
}

enter image description here

0 个答案:

没有答案