popupwindow

can't dismiss popUpWindow [duplicate]

家住魔仙堡 提交于 2019-12-13 04:19:55
问题 This question already has answers here : Android popup window dismissal (10 answers) Closed 5 years ago . i created my popUp window public void myPopUp() { LinearLayout myView = new LinearLayout(getApplicationContext()); pw = new PopupWindow(getApplicationContext()); pw.setContentView(myView); myView.setBackgroundColor(Color.WHITE); pw.setWidth(curWidth-100); pw.setHeight(curHeight-100); pw.showAtLocation(background, Gravity.CENTER, 0, 0); } and overrided backButton pressed for dissmis public

QWebView allow pop-ups?

北城以北 提交于 2019-12-13 02:18:38
问题 In my project, I have a QWebView that loads a page that opens a pop-up window. But the window won't open. I looked into the createWindow function but I have no clue how to subclass a widget. These are some settings I put onto the webView: QWebSettings *settings = ui->webView_2->settings(); settings->setAttribute(QWebSettings::JavascriptEnabled, true); settings->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); What is the easiest way to allow my webView to allow pop-up windows?

I want to pop up a div after submit a form

安稳与你 提交于 2019-12-12 21:30:24
问题 I want to pop up the #popUpDiv after submit a form Script $(document).ready(function(){ $('#form').on('submit',function(e){ e.preventDefault(); $.post('post.php', $(this).serialize(), function(response){ $('#result').html(response); $('#popUpDiv').fadeIn(); } }); }); Form code below <form id="form"> Number: <input type="text" name="number" /> <input class="show" type="submit" Value="Submit" name="submit" /> </form> Result will be display here <div id="popUpDiv" style="display:none"> <div id=

How to define layout in a PopupWindow from an xml file, when PopupWindow method is called from a separate class

試著忘記壹切 提交于 2019-12-12 16:19:27
问题 I'd like to be able to define layout in a PopupWindow from an xml file when the PopupWindow method is called from a separate class. Below code works as needed EXCEPT that layout is pulled from the java file and not the xml file.I do not know how to properly access xml layout and implement in the PopupWindow in this situation, or if this is possible. Advice and specific suggestions are appreciated. Thanks. showPopup.java public class showPopup { Context ctx; Button btnDismiss; public showPopup

Android - PopupWindow above a specific view

给你一囗甜甜゛ 提交于 2019-12-12 07:39:37
问题 I am developing an application for Android and I am using a popup window when the user clicks a specific menu bar object(consisting of small images lined up horizontally) on the bottom of the screen. On the click I want the popup window to be anchored to the top-left corner of the view that was clicked and be shown on top. The only methods that seem to be relevant are showAsDropDown(View anchor, int xoff, int yoff) and showAtLocation(View parent, int gravity, int x, int y) . The problem with

popup window from android options menu not working

柔情痞子 提交于 2019-12-12 05:28:32
问题 Actually I am showing popup window(custom layout) when options menu item clicked and my options menu are bottom to the screen(splitActionBarWhenNarrow).I am getting some exception please help me code: switch (item.getItemId()) { case R.id.redid: Toast.makeText(MainActivity.this,"red color", Toast.LENGTH_SHORT).show(); break; case R.id.blueid: Toast.makeText(MainActivity.this,"blue color", Toast.LENGTH_SHORT).show(); break; case R.id.greenid: LayoutInflater inflater=(LayoutInflater)

Position afollestad MaterialDialog below a button

岁酱吖の 提交于 2019-12-12 03:54:40
问题 Is there an option to position https://github.com/afollestad/material-dialogs below a button as like the mock up I have attached . Or is there any other library to fulfill my requirement. 回答1: You need to catch the location of the clicked UI that is your Filter icon ImageView . You have to use the getLocationOnScreen() API and PopUpWindow component. This is the sample code for inflating the FilterUI text_click=(TextView)findViewById(R.id.text_click); text_click.setOnClickListener(new View

How do I add a “Order for Pickup” button to my popup window allowing to proceed to checkout?

旧时模样 提交于 2019-12-12 03:37:44
问题 <script> jQuery(function() { var $ = jQuery; $(document).on('touchstart mouseover', 'a#wsite-com-minicart-checkout-button', function(e) { var totalCount = $( "span#wsite-nav-cart-num" ).text(); var totalNeeded = 12; if (totalCount < totalNeeded) { var totalItems = totalNeeded - totalCount; $("a#wsite-com-minicart-checkout-button").click(function(event){ event.stopImmediatePropagation(); alert('Orders under ' + totalNeeded + ' packages are only available for pickup. Click "Order for Pickup" to

BadTokenException Unable to add Window Spinner in PopUpWindow

你离开我真会死。 提交于 2019-12-12 02:16:43
问题 I know there are a lot of similar questions here, but I'm not able to transfer the answers to my problem (or I didn't find THE answer I need...) In my menu on actionBar (in onOptionsItemSelected) I open a popupWindow for user settings. Checkbox and RadioButtons work fine, but if I tab on the Spinner, there will be a FATAL EXCEPTION: FATAL EXCEPTION: main android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@42766f00 is not valid; is your

Delete a single URL from a chrome-extension popup-window seems not working with adding event listeners (the event listener might be scoped?)

十年热恋 提交于 2019-12-12 01:45:51
问题 Background information I am trying to make a functional chrome-extension popup-window that enables the user to add links (based on the open tab's URL) when he desires it, and deletes one link or delete all of the links in just one click. Down below are all of my files! I must say in advance that I am not very good (and not experienced) with using jQuery's library but if that's the only solution that I have, than I will use it in my code. The problem The buttons to delete all the links and the