In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "Android how to customize the pop-up window prompt effect", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Android how to customize the pop-up window prompt effect" bar!
This article example for you to share the Android custom pop-up window prompt specific code, for your reference, the specific content is as follows
Java file:
Private void showSetDeBugDialog () {AlertDialog.Builder setDeBugDialog = new AlertDialog.Builder (this); / / get the interface View dialogView = LayoutInflater.from (this) .propagate (R.layout.system_admin_psw_alert_dialog, null); / / fill the interface into the AlertDiaLog container and remove the frame setDeBugDialog.setView (dialogView,0,0,0,0) / / initialize the control TextView but_cancel = dialogView.findViewById (R.id.but_cancel); TextView but_confirm = dialogView.findViewById (R.id.but_confirm); / / cancel clicking on the external vanishing window setDeBugDialog.setCancelable (false); / / create AlertDiaLog setDeBugDialog.create (); / / AlertDiaLog display final AlertDialog customAlert = setDeBugDialog.show () / / set the AlertDiaLog width and height attribute / / WindowManager.LayoutParams params = Objects.requireNonNull (customAlert.getWindow ()). GetAttributes (); / / params.width = 200 / params.height = 200 / customAlert.getWindow (). SetAttributes (params); / / remove the decorview background color Objects.requireNonNull (customAlert.getWindow ()). SetBackground (null) of dialog / / set the click event logic but_cancel.setOnClickListener of the custom interface (new View.OnClickListener () {@ Override public void onClick (View view) {customAlert.dismiss ();}}) But_confirm.setOnClickListener (new View.OnClickListener () {@ Override public void onClick (View view) {customAlert.dismiss ();}});}
Layout file:
Resource files:
Background style
At this point, I believe that everyone on the "Android how to customize the pop-up window prompt effect" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.