activity跳转,关闭页面动画以及对跳转黑屏处理

跳转的时候在跳转之后加overridePendingTransition(R.anim.push_bottom_in,R.anim.push_style_out);

yixiao.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent intenta = new Intent(MainActivity.this, TabYxiaoActivity.class);
              startActivity(intenta);
              overridePendingTransition(R.anim.push_bottom_in,R.anim.push_style_out);
          }
      });

关闭页面在finish之后加 overridePendingTransition(0,R.anim.push_bottom_out);

 back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
                overridePendingTransition(0,R.anim.push_bottom_out);
            }
        });	      

上下滑动动画:push_bottom_in

      

上下滑动动画:push_bottom_out


    
 

防止黑屏:push_style_out


    

你可能感兴趣的:(activity跳转,关闭页面动画以及对跳转黑屏处理)