What does this 4 line java code means in android application?

前端 未结 3 1339
滥情空心
滥情空心 2020-12-03 19:48

In my java application i have this code

@Override
public void onAttachedToWindow()
  {
  this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DI         


        
3条回答
  •  情深已故
    2020-12-03 20:20

    I've solved this issue putting

    this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
    

    in onCreate before calling super.

     protected void onCreate(Bundle savedInstanceState) {
    
            this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
    
            super.onCreate(savedInstanceState);
    }
    

    Saludos desde Medellín

提交回复
热议问题