popupwindow

ListPopupWindow not obeying WRAP_CONTENT width spec

依然范特西╮ 提交于 2019-12-02 20:06:29
I'm trying to use ListPopupWindow to show a list of strings via an ArrayAdapter (eventually this will be a more complex custom adapter). Code is below. As shown in the screenshot, the resulting ListPopupWindow seems to act as if the content width is zero. It shows the proper number of items, the items are still clickable, and clicking successfully produce a Toast , so at least that much is working properly. An interesting note: I could supply a width in pixels to popup.setWidth(...) instead of ListPopupWindow.WRAP_CONTENT and it will show some of the content, but this seems very inflexible.

发送朋友圈的popupWindow

别等时光非礼了梦想. 提交于 2019-12-02 14:48:32
在我们做分享功能的时候,经常会需要自定义一些视图去实现分享,下面是根据公司的要求,写的一个popupwindow,如有不妥的地方,欢迎大家给出意见。 package com.chen.demo; import android.app.Activity; import android.content.Context; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.PopupWindow; public class MainActivity extends Activity implements OnClickListener{ @Override protected void onCreate(Bundle savedInstanceState) { super

Display message when user leaves site

一世执手 提交于 2019-12-02 13:36:11
I'm looking for a way to display a message to the user if he leaves my site after only viewing one page. I found this ( http://www.pgrs.net/2008/1/30/popup-when-leaving-website ) clever solution, but it has a few flaws: staying_in_site = false; Event.observe(document.body, 'click', function(event) { if (Event.element(event).tagName == 'A') { staying_in_site = true; } }); window.onunload = popup; function popup() { if(staying_in_site) { return; } alert('I see you are leaving the site'); } It displays the message also when refreshing the page or using the back button. Do you know a better

Alert is not working in pop up window in chrome extension

人盡茶涼 提交于 2019-12-02 10:03:19
问题 Could any one help me,to find out my problem.I have set my website as chrome extension.When I install the extension,it navigates to a popup window asking user name and password along with a login button. But when I tried to alert the username entered by the user in javascript,it is not working.Anyone please help me.What would be the reason? Here is my manifest.json { "name": "Calpine Extension", "version": "1.0", "description": "Log on to calpinemate", "manifest_version": 2, "browser_action":

Ruby with Watir: Handling javascript popup window

久未见 提交于 2019-12-02 09:42:35
I have a problem with watir and javascript popup window here's my test script require 'watir' browser = Watir::Browser.start "/url/" browser.link(:text, /Add New Blog/).wait_until_present browser.link(:text, /Add New Blog/).click // Here is where the javascript window popup window = browser.ie.Document.ParentWindow browser.window(:title, /Blog/) do browser.text_field(:id, /text title of Blog/).set 'Watir' browser.select_list(:id, /dropdownlist type/).select ("News") browser.button(:value, /Save/).click end The problem is after window popup shows , it's unable to locate the element of the text

How to close all popup windows in Flex?

徘徊边缘 提交于 2019-12-02 06:44:46
I want to show all popup windows(already popped up and closed individually) on an image by pressing a button press and want to close all those windows on another button press. Any help is appreciated. Try this: package com.devahead.utils { import flash.display.DisplayObject; import mx.collections.ArrayCollection; import mx.core.Application; //import mx.core.FlexGlobals; // NOTE: use this import for Flex 4.x and higher import mx.core.IChildList; import mx.core.UIComponent; import mx.managers.PopUpManager; public class PopUpUtils { /** * Returns all the popups inside an application. Only the

Handling events from a Kendo MVC Grid's PopUp editor window

坚强是说给别人听的谎言 提交于 2019-12-02 03:43:44
I have a Kendo MVC grid that I am creating with the Html.Kendo().Grid helper. When the PopUp editor window opens, I want to catch the event and run a bit of javascript. When I configure a normal kendo window with .Events, the events fire properly and my function runs. However, when I code the .Events property on the .Editable.Window of the grid, the events do not fire. @(Html.Kendo().Grid<FooRecord>() .Name("cFooGrid") .Columns(c => { c.Bound(f => f.Foo); c.Bound(f => f.Bar); c.Bound(f => f.Bas); c.Command(a => a.Edit()); }) .Editable(e => e .Mode(GridEditMode.PopUp) .Window(w => w.Events(v =>

Window.opener in Microsoft Edge undefined when running at localhost

泄露秘密 提交于 2019-12-02 03:33:44
I'm using Microsoft Edge in localhost for development. Website is accessed via http://localhost I open a popup and want it to post a message to the opener via window.opener.postMessage My code works with Chrome, and Safari, and even Microsoft Edge when the website is on staging or production. But when I run in in local mode, the window.opener is undefined. CORS on localhost is tricky so try to create a domain name you like to your hosts file (%windir%\System32\Drivers\etc\hosts) - if you're in a Windows-based platform and map those back to 127.0.0.1. You probably already know how to change the

Android PopUp ListView

青春壹個敷衍的年華 提交于 2019-12-02 02:12:47
问题 I want to implement in my android application a functionality like when a user clicks a button in header a small list view is popup having 5 values in the corner of the screen. Please give some suggestion, its urgent. Thanks in advance. 回答1: You mean a quick action menu ? Like this ? If so, check this : http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/ 回答2: It depends somewhat on the minimum SDK that you are targeting. If you are able to write your application with a

how to make popup windows always on top?

Deadly 提交于 2019-12-01 22:26:43
I want to have a javascript/jQuery popup window (child page) that is always in front of the parent page, something like facebook's current picture viewing feature. it would be closed by the user clicking on the close button. I have tried as below: mywindow = window.open ("DownloadForm.aspx", "mywindow","location=1,status=1,scrollbars=1, width=350,height=150"); mywindow.moveTo(350, 350); this code successfully opened a child page in front of the parent page, but there is jQuery code ( $(#test).click() ) on the parent page which causes the parent page to always be in front. I tried putting the