how to handle onclick event of button inside popup window in android

前端 未结 4 1103
天命终不由人
天命终不由人 2021-01-02 11:01

In my application, I have a button initially on the screen, and in onclick of the button, a popup window should open. In the popup window, I have an imagebutton

4条回答
  •  悲&欢浪女
    2021-01-02 11:40

    In main activity button onClick you can use:

        popupWindow.getContentView().findViewById(R.id.buttonInPopup).setOnClickListener(new OnClickListener(...)
    

提交回复
热议问题