popupwindow

Android Spinner Exception when clicked BadTokenException

假装没事ソ 提交于 2019-12-10 10:08:45
问题 I have a problem when clicking on a spinner ( in a popup window ) here is my popup: public class PopupDialog extends PopupWindow { public PopupDialog() { super(); init(); } public PopupDialog(View contentView, int width, int height) { super(contentView, width, height); init(); } public PopupDialog(View contentView) { super(contentView); init(); } private void init() { this.setTouchable(true); this.setFocusable(true); this.setOutsideTouchable(true); setBackgroundDrawable(new BitmapDrawable());

What's the simplest way to get an image to print in a new window when clicked?

走远了吗. 提交于 2019-12-10 09:25:31
问题 I'm trying to create a simple click to print link for an image, and what I'd like to happen is when the link is clicked, a new window opens with the image, and the browser opens the print command dialogue box. My question is whether this is possible just from a URL parameter, or from the anchor element on the initiating page? Or do I have to build a target page with javascript to do this? Here's a sample of what I've got: <p class="click-2-print"> <a href="/img/map.jpg" target="_blank">Click

Android交互优雅的通用弹窗源码案例

拜拜、爱过 提交于 2019-12-10 03:58:29
作者li-xiaojun,源码XPopup,功能强大,UI 简洁,交互优雅的通用弹窗!可以替代 Dialog,PopupWindow,PopupMenu,BottomSheet,DrawerLayout,Spinner 等组件,自带十几种效果良好的动画, 支持完全的 UI 和动画自定义! 效果图 源码下载: http://code.662p.com/view/16810.html 更多源码干货分享,转到 http://code.662p.com/查找 来源: oschina 链接: https://my.oschina.net/u/4140975/blog/3064413

jQuery function to open link in new window

冷暖自知 提交于 2019-12-10 02:39:08
问题 I'm trying to find a plugin or simple script to open a file in a popup window by clicking on a button. This used to work, but with all the jQuery updates (even with the migration file), this no longer works. I found this, but this opens the popup and also redirects to the file url: $(document).ready(function() { $('.popup').click(function(event) { window.open($(this).attr("href"), "popupWindow", "width=600,height=600,scrollbars=yes"); }); }); Any way to get a simple popup? It needs to have

popupwindow popupmenu dialog

我只是一个虾纸丫 提交于 2019-12-09 16:23:47
private void iniPopupWindow() { LayoutInflater inflater = (LayoutInflater) this .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.task_detail_popupwindow, null); pwMyPopWindow = new PopupWindow(layout); pwMyPopWindow.setFocusable (true);// 加上这个popupwindow中的ListView才可以接收点击事件 lvPopupList.setAdapter(); // 控制popupwindow点击屏幕其他地方消失 pwMyPopWindow.setBackgroundDrawable (this.getResources().getDrawable( R.drawable.bg_popupwindow));// 设置背景图片,不能在布局中设置,要通过代码来设置 pwMyPopWindow.setOutsideTouchable(true);// 触摸popupwindow外部,popupwindow消失。这个要求你的popupwindow要有背景图片才可以成功,如上

Dismiss PopupWindow on touch outside popup, without using deprecated constructor

▼魔方 西西 提交于 2019-12-09 09:03:57
问题 I have a PopupWindow and I wanted it to dismiss when the user touches outside, so I looked into and found out that I had to use popup.setBackgroundDrawable(new BitmapDrawable()); . The problem is that the constructor new BitmpaDrawable() is deprecated. I Would like to find a solution without using it. Anybody knows how to solve this? Thanks! final PopupWindow popup = new PopupWindow(sortByView, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true); popup

Android softkeyboard popup view on key long press

时光毁灭记忆、已成空白 提交于 2019-12-09 06:07:53
问题 I am developing Android soft keyboard: public class CustomKeyboard extends Keyboard{...} public class CustomKeyboardView extends KeyboardView{...} public class CustomKeyboardIME extends InputMethodService implements KeyboardView.OnKeyboardActionListener{...} On some keys, I have popupKeyboard and popupCharacters: <Key android:codes="144" android:keyLabel="0" android:popupKeyboard="@xml/key_popup" android:popupCharacters=")" android:keyEdgeFlags="right"/> xml/key_popup.xml: <Keyboard xmlns

How to refresh parent page after closing popup window in javascript?

拜拜、爱过 提交于 2019-12-09 04:56:56
问题 I have one page list.jsp having list of all records in table and one button at top to add new record. I want to open add.jsp as a popup window. This works but when I close popup window how to update list.jsp so that it shows newly added record Here is my code what i tried... list.jsp <html> <head> <script> function popupwindow(url, title, w, h) { var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); popupWindow = window.open(url, title, 'toolbar=no, location=no, directories=no

Popup (using PopupWindow or Dialog) fills the width of the screen for no apparent reason

半世苍凉 提交于 2019-12-08 19:11:58
问题 I am trying to get a popup to behave! =) The problem is that the popup "fills the width" of the entire screen, even though the layout clearly says that it should "wrap_content". It doesnt matter if I use Dialog or PopupWindow. First, the XML layout of the popup, popup_message.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_margin="20dp"

Dialogs and Popups in Android

让人想犯罪 __ 提交于 2019-12-08 15:17:14
问题 The Android design documentation in http://developer.android.com/design/building-blocks/dialogs.html makes a clear differentiation between Dialogs, Alerts, Popups and Toasts. It also recommends the implementation of Dialogs by means of the DialogFragment class and Toasts by means of the Toast class. However it's not clear to me whether Popups should be implemented with PopupWindow or with DialogFragment . I know that DialogFragments usually come with Ok/Cancel buttons and that the location of