Translucent Activity filling the entire screen

后端 未结 5 1146
忘掉有多难
忘掉有多难 2020-12-29 08:13

I\'d like to have an activity (2) with translucent aspect over another activity (1), aligned at the top of the screen (4).

5条回答
  •  抹茶落季
    2020-12-29 09:06

    I am not sure how to do it through the xml, but this should work programmatically, try adding this to your activity (maybe to the mainview of the activity).

    //grab layout params
    WindowManager.LayoutParams lp = this.getWindow().getAttributes();
    
    //remove the dim effect
    lp.dimAmount = 0;
    

提交回复
热议问题