popupwindow

How to blur/dim an activity when a popup window is shown in android

淺唱寂寞╮ 提交于 2019-12-05 16:47:30
I use a popupwindow for displaying options in Android. I tried to dim/blur the activity when a popupwindow is active, but I did not find a solution... can anybody help me. I used the following code but it does not work for me. getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_BLUR_BEHIND); Use it like this: WindowManager.LayoutParams lp = dialog.getWindow().getAttributes(); lp.dimAmount=0.0f; dialog.getWindow().setAttributes(lp); dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND); 来源: https://stackoverflow.com/questions/8386410/how-to-blur-dim-an-activity

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

☆樱花仙子☆ 提交于 2019-12-05 13:07:57
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 here to print the map above</a> </p> Obviously the code above will open the image in a new window, but

angular event success when submit form it opens popup

a 夏天 提交于 2019-12-05 12:30:02
I have a page which post data to a ASPNET MVC page by angular $http.post(..) and when the calling finish I have to submit a form. Basically I do the following: <html ng-app> <body data-ng-controller="testController"> <form id="Checkpay" name="Checkpay" style="margin: 0" method="post" action="https://www.sandbox.paypal.com/cgi-bin/webscr" target="_blank" class="ng-pristine ng-valid"> <input type="hidden" name="quantita" id="qtytext" value="0"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="item_name" value="Le Spose di Nika"> <input type="hidden" name="business"

Open a PopupWindow and let the outsides still touchable

徘徊边缘 提交于 2019-12-05 07:53:35
How to open a PopupWindow on Android and let all the others components touchable without dismiss the PopupWindow? This is how it's created: public class DynamicPopup { private final PopupWindow window; private final RectF rect; private final View parent; private final RichPageView view; public DynamicPopup(Context context, RichPage page, RectF rectF, View parent) { this.parent = parent; rect = rectF; window = new PopupWindow(context); window.setBackgroundDrawable(new BitmapDrawable()); window.setWidth((int) rect.width()); window.setHeight((int) rect.height()); window.setTouchable(true); window

PopupWindow的使用简介

白昼怎懂夜的黑 提交于 2019-12-05 07:52:06
一、简介 PopupWindow一般用于View控件周边的弹出窗口。 public PopupWindow (View contentView, int width, int height, boolean focusable) 创建一个新的弹出窗口可以显示contentView。 窗户的尺寸必须传递给构造函数。 二、使用 1.创建弹出窗口popup_widow.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <RadioButton android:paddingLeft="10dp" android:paddingRight="15dp" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:text="@string/str_hdmi14"

安卓巴士Android开发者门户

浪子不回头ぞ 提交于 2019-12-05 05:33:28
一、开源库 1.SimpleRatingBar 简单好用的ratingbar 2.NumberRain Android自定义控件仿黑客帝国数字雨 3.CacheWebView 突破系统WebView缓存的空间限制的WebView 4.luckly_popup_window Android开发使用PupopWindow在指定View的上下左右动态显示菜单列表,模仿IOS底部弹窗列表。 5.PhotoEditor 图片编辑器 二、工具 1.LayoutMaster 插件基于Layout Inspector,强化了这个工具,故取名Layout Master。 2.aliyun-sms 一个应用阿里云短信推送服务的Ruby Gem。 3.tray 支持多进程的Android的SharedPreferences替代品 4.gradle For more information about Gradle, please visit: https://gradle.org 5.UETool UETool 是一个各方人员(设计师、程序员、测试)都可以使用的调试工具。它可以作用于任何显示在屏幕上的 view 三、开源项目 1.AndroidTVLauncher 这是一个TV Leanback 风格桌面 2.Java-Poetry App《最美诗词》服务器端源码,当前版本仅提供API接口 RN 3

Is it possible for parent window to notice if child window has been closed?

谁都会走 提交于 2019-12-05 05:29:51
I have parent window (opener) and child (popup) ---------- -------------- | | | | | parent | -----> opens popup | child | | | | | ----------- -------------- Let's say, in parent page, I have js function hello() In order for child to call parent's hello() when the child window is closed and also pass an argument, I can do, window.close(); window.opener.hello(someArgument); This will close the window and also call parent's hello(); But what if I don't want to have the code window.opener.hello() in child page? I mean I want the code to be in parent page only One thing I can think of is: Somewhat

Android Popup Window vs Android Dialog

China☆狼群 提交于 2019-12-05 05:17:13
问题 I am trying to implement a simple logic in my application where the user is shown a popup (after sometime of application launch). The popup simply shows a TextView with some info message. This message is refreshed every time the application is launched and a new message is shown. The UI of the popup matches my application UI - here maybe just popup background images is needed. Also one close button (X) is shown at the top right corner of the popup - to close this popup. Logic of Showing

Show list view in a popup window - Android

泄露秘密 提交于 2019-12-05 04:23:32
问题 I'm working on a project in Android and I have a problem. I have an activity which includes three buttons, edit text and a list view. I want to change that implementation and to show the list view on a new popup window only when the user press the select all button. I've added my code, thanks. public class Notepadv1 extends ListActivity implements OnClickListener { private WordsDbAdapter mDbHelper; private Button selectAllButton; private PopupWindow mPopup; @Override public void onCreate

Android:PopupWindow

北战南征 提交于 2019-12-05 02:47:29
一、概述 1、构造方法 部分常用: PopupWindow(View contentView, int width, int height) Create a new non focusable popup window which can display the contentView. PopupWindow(View contentView, int width, int height, boolean focusable) Create a new popup window which can display the contentView. contentView为要显示的view,width和height为宽和高,值为像素值,也可以是MATCHT_PARENT和WRAP_CONTENT。 focusable为是否可以获得焦点,也可以通过set方法设置: // Changes the focusability of the popup window setFocusable(boolean focusable) 根据网上的资料,focusable参数的主要作用是: 如果focusable为false,在一个Activity弹出一个PopupWindow,按返回键,由于PopupWindow没有焦点,会直接退出Activity。如果focusable为true