popupwindow

android popup window not displaying

社会主义新天地 提交于 2020-02-04 05:54:28
问题 I am creating a popup window with a listview. In the listview each row contains a textbox and radio button but the popup window not displaying. I can't figure out the mistake. This is the code. import java.util.List; import java.util.Vector; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Typeface; import android.os.Bundle; import android.preference.PreferenceManager; import android

Android Studio阶段性学习总结_1

杀马特。学长 韩版系。学妹 提交于 2020-01-30 13:39:58
这半个月一直在学习Android方面的知识,对Android开发有了一个基本的认识, 学会了 Android studio 的基本操作。 在建立第一个 Android studio 项目时,我遇到了很大的阻碍,像这种问题 ERROR: Cause: unable to find valid certification path to requested target 等等,我以为会像安装 ecplise 时那样卡住,每当解决一个问题就会冒出一个新的问题,后来我放平了心态,平心静气地去寻找它的原因,百度了各种方法,像设置代理等等方法,再后来我知晓了这大概是网络问题。在暑假搞 ecplise 时就是因为家里的 wifi 并不能访问它的网站而安装失败,后来我就用自己的流量试了试,这个无法连接的问题就解决了,之后我又注释掉了 junit ,才正常构建出第一个 hello world ,正如在 ecplise 安装过程一样,这几天时间使我对 Android studio 更加熟悉,为后续的学习开辟道路。 在解决完它的构建问题后,我便全身心投入到了 Android 学习中去,首先,我花了两天时间熟悉了各类文件的位置,并学习了线性布局和相对布局两种基础的布局,了解到了两种布局的各种属性,像 height 、 width 、 orientation 、 below 、 background 等等

How Do I Open a Pop Up Window over Destination URL?

只愿长相守 提交于 2020-01-26 04:06:10
问题 I want to link to a url and after the destination page opens, pop up a window over it. I've seen some examples of this but don't know how to code it. I'm a .NET developer but perhaps this needs javascript? Anyone know how to do it? Page 1 Link 2 Page 2 ---> Page 2 opens... Popup opens over Page 2. Thanks. 回答1: Approach #1: In Page 2: <script> if (document.referrer === "URL of Page 1 goes here") { window.open("URL of popup goes here", "_blank"); } </script> Thus the popup will only appear if

Popup without user action?

泄露秘密 提交于 2020-01-25 06:13:40
问题 How is this site triggering its popup while bypassing Chrome's pop-up blocker? http://undertexter.se/ I thought pop-up blockers only allowed window.open if it was triggered by a user action but that's not the case here so how are they doing it? 回答1: Tested on my own server, This opens up http://google.com in a new (standalone) window in Chromium 28 on Ubuntu 12.04. Adblock is active. <script type="text/javascript"> document.addEventListener('click', function() { window.open('http://google.com

BadTokenException: Unable to add window — token null is not valid; is your activity running? in activity.isFinishing statment

走远了吗. 提交于 2020-01-24 03:50:31
问题 I have a popUpWindow that need to by displayed, after couple of seconds if the user is still on current activity. I implemented stament that check if the activity isnt finished/destroyed and then display the Popup, and it works fine, for weekend users :) ( slowly clicking from activity to activity) but in high pressuretests ( activities are recreating, finished, fast move form activity to activity) that gives me that error : E/UncaughtException: android.view.WindowManager$BadTokenException:

How to open webview in popupwindow in android?

泪湿孤枕 提交于 2020-01-24 00:24:34
问题 I want to add web view in PopupWindow in my android application.This is only working for alert dialog. And this is my code: AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this); alert.setTitle("Google"); WebView wv = new WebView(MainActivity.this); wv.loadUrl("http:\\www.google.com"); wv.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } }); alert.setView(wv); alert

How to open multiple pop-up windows?

我怕爱的太早我们不能终老 提交于 2020-01-23 08:39:10
问题 I have five links and each links to a page. function TohokuImgPopup(url) { popupWindow = window.open( url, 'popUpWindow'+randomno, 'height=246,width=228,left=0,top=0,resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,directories=no,status=no') } This is the function I am using. I have different function for the 5 links, each opens a new window. But I am only able to open one popup at a time. How can I open multiple popups? 回答1: I found the answer. <script type="text/javascript"> $

PopupWindow - not working on a few devices

扶醉桌前 提交于 2020-01-23 04:26:12
问题 I use following code to show a small popup: public static PopupWindow showImportMenu(Activity activity, View anchor, PopupWindowClickListener onClickListener) { LayoutInflater inflater = LayoutInflater.from(activity); PopupImportBinding binding = DataBindingUtil.inflate(inflater, R.layout.popup_import, null, false); if (!RootTools.isRootAvailable()) binding.llImportRootMethod.setVisibility(View.GONE); PopupWindow popupWindow = new PopupWindow(activity, null, R.attr.popupMenuStyle);

Blur or dim background when Android PopupWindow active

守給你的承諾、 提交于 2020-01-18 04:09:07
问题 I would like to be able to either blur or dim the background when I show my popup window using popup.showAtLocation , and unblur/dim the background when popup.dismiss is called. I have tried applying layout params FLAG_BLUR_BEHIND and FLAG_DIM_BEHIND to my activity, but this appears to just blur and dim the background as soon my app is started. How can I do blurring/dimming just with popups? 回答1: The question was about the Popupwindow class, yet everybody has given answers that use the Dialog

动态添加数据通用PopupWindow

人盡茶涼 提交于 2020-01-16 07:15:50
如图所示: 如果一个项目有很多页面很多地方用到PopupWindow样式一样 里面的内容不一样 那么就可以抽取出公共的样式 只需传入不同的内容(里面的文字),通过点击回调的方式去让调用者去实现功能,这样可以大大减少重复的代码。 首先PopupWindow xml 布局如下所示 : LinearLayout ll_add_textview 通过传入的数据调用addView 方法 动态添加TextView < ? xml version = "1.0" encoding = "utf-8" ? > < LinearLayout xmlns : android = "http://schemas.android.com/apk/res/android" android : id = "@+id/linearLayout" android : layout_width = "match_parent" android : layout_height = "wrap_content" android : orientation = "vertical" > < LinearLayout android : id = "@+id/ll_add_textview" android : layout_width = "match_parent" android : layout_height =