How to display transparent activity on the another activity without removing previous activity

前端 未结 3 1591
你的背包
你的背包 2020-12-25 12:53

How to display transparent activity on the another activity without removing previous activity ?

I am able to create transparent activity but when i trying to push i

3条回答
  •  攒了一身酷
    2020-12-25 13:35

    declare your activity in manifest like this

     
    

    and add a transperent background to your layout like this

     
     
     
    

    Edit:

    i think you are using this to open your transparent activity it finish your previous activity

    Intent intent =new Intent(mContext,yourNewActivity.class);
    startActivity(intent);
    finish();
    

    remove finish from here then your new activity in on top of previous activity like this

     Intent intent =new Intent(mContext,yourNewActivity.class);
     startActivity(intent);
    

    Hope help..

提交回复
热议问题