Simple practical case of popupwindow (displayed below the control)
•
Android
Step 1:
private PopupWindow mPopupWindow;
Step 2: write a popupwindow layout file XML
Step 3: write code in activity
Note:
If an error is reported when directly writing the pop-up popupwindow() method in the oncreate() method of the activity, because the popupwindow cannot be pop-up until the activity is fully started, we only need to pop up the popupwindow after the activity is fully started.
Rewrite the onwindowfocuschanged() method:
The above simple practical case of popupwindow (shown below the control) is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码