popupwindow

How to disable location bar and scroll bars of pop window in Chrome?

那年仲夏 提交于 2019-12-04 05:52:21
For the following code width and height are working in Chrome but location and scrollbar are not working. Please guide. <script language="JavaScript"> function newwindow() { window.open('http://localhost/a.php', 'jav', 'width=300,height=200,resizable=yes,location=no,scrollbars=no'); } </script> <a href="javascript:newwindow()">Click Here</a> James Montagne Chrome will not allow you to do this for security reasons. Hiding the address bar makes it easier to pretend you're somebank.com when really you're somenigerianguy.com . As for the scrollbar, you can use css on a.php to hide the scrollbars

Android之Window和弹窗问题

北战南征 提交于 2019-12-04 05:21:42
目录介绍 10.0.0.1 Window是什么?如何通过WindowManager添加Window(代码实现)?WindowManager的主要功能是什么? 10.0.0.2 Window概念解析?WindowSession的创建过程是怎样的?WindowSession的作用?Token的使用场景? 10.0.0.3 Activity、View、Window三者之间的关系,Window有哪几种类型? 10.0.0.5 Activity的启动过程是怎样的?Activity创建和Dialog创建过程的异同? 10.0.0.6 如何处理快速连续点击了多次按钮时Toast就触发了多次而关闭不掉? 10.0.0.7 DecorView何时才被WindowManager真正添加到Window中?Window的addView源码分析? 10.0.0.8 Dialog的Window创建过程?为什么Dialog不能用Application的Context? 10.0.0.9 什么是DecorView?如何获取到DecorView?DecorView的职责是什么?DecorView如何被加载到Window中? 10.0.1.0 DecorView如何显示出来,为什么setContentView()设置的界面,为什么在onResume()之后才对用户可见呢? 10.0.1.1 什么是ViewRoot

使用 PopupWindow 的注意事项

删除回忆录丶 提交于 2019-12-04 01:32:19
预备知识 使用 PopupWindow 之前, 一定要知道 Android 是怎么响应 旋转屏幕的. 如果不知道的话, 那就先去了解下这个知识点. >>> Google 关键词: Android Activity 重建 另外需要知道的就是PopupWindow的使用方法. >>> Google 关键词: Android PopupWindow 注意事项 不要在 Activity.onCreate(Bundle) 中直接 调用 如果你直接调用PopupWindow.show***(...)的方法, 那么系统会回馈你一个错误, 如下: Unable to add window -- token null is not valid; is your activity running? 如果切实需要在 Activity.onCreate(Bundle) 中弹出 PopupWindow, 那么你可以通过 View.post(Runnable) 来完成, ---- 这个调用可以确保弹出窗口时, Activity 已经 完成 初始化. p.s. View.post(Runnable) 要比 Handler.post(Runnable) 强大, 具体参考Android SDK Source. 在旋转屏幕时 不要忘记 对 PopupWindow 进行处理 如果你忘记了, 那么系统还是会回馈你一个错误

PopupWindow above Virtual keyboard

╄→尐↘猪︶ㄣ 提交于 2019-12-03 23:30:19
I have a PopupWindow that is shown when a user is typing in an EditText. This popup offers him some suggestions. My problem is that when the Popup is shown, a part of it is displayed over the Keyboard on the screen, preventing the user to continue typing. Does anyone know why of this behaviour and how could I fix it? To have your popupwindow behind the softkeyboard just set this line: popupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED); and also popupWindow.setFocusable(false); popupWindow.setOutsideTouchable(false); try this popupWindow = new PopupWindow(popupView, WindowManager

Show list view in a popup window - Android

喜你入骨 提交于 2019-12-03 20:47:36
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(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);

Android: How to drag(move) PopupWindow?

泄露秘密 提交于 2019-12-03 14:40:33
I want to be able to move PopupWindow on touch dragging. I don't want UI to update on the release of the touch. I want PopupWindow to follow my touch. This is something what I am doing: mView = mLayoutInflater.inflate(R.layout.popup, null); mPopupWindow = new PopupWindow(mView, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, false); mPopupWindow.showAtLocation(parentView, Gravity.CENTER, -5, 30); mView.setOnTouchListener(new OnTouchListener() { private int dx = 0; private int dy = 0; @Override public boolean onTouch(View view, MotionEvent motionEvent) { switch (motionEvent.getAction()) {

selenium, how can I select new window

折月煮酒 提交于 2019-12-03 14:39:32
I run my selenium rc test in Eclipse with TestNG. I have a link which tries to open a new browser page. How can I select this new page to operate in? I use this code: selenium.selectWindow("name=NewPage"); however it says page not found. I also try to define page ids or titles with this code: String[] wins = selenium.getAllWindowIds(); for (String s : wins) System.out.println("win: " + s); It does not define my new opened window: win: MainPage win: If use selenium.getAllWindowNames() I get win: selenium_main_app_window win: selenium_blank65815 . I write this code selenium.selectWindow("name

How to make a “popup” (hint, drop-down, popup) window in Winforms?

非 Y 不嫁゛ 提交于 2019-12-03 14:37:56
问题 How can i make, what i will call, a "popup" window" in WinForms? Since i used my own made-up word "popup" , let me give examples of this so-called "popup" window: a tooltip window (can extend outside the boundaries of its parent form, doesn't appear in the taskbar, is not modal, and doesn't steal focus): a popup menu window (can extend outside the boundaries of its parent form, doesn't appear in the taskbar, is not modal, and doesn't steal focus): a drop-down window (can extend outside the

Android Nougat PopupWindow showAsDropDown(…) Gravity not working

梦想与她 提交于 2019-12-03 11:47:21
问题 I have this code. PopupWindow popUp = new PopupWindow(); popUp.setFocusable(true); popUp.setOutsideTouchable(true); popUp.setWidth(ViewGroup.LayoutParams.MATCH_PARENT); popUp.setHeight(600); popUp.setContentView(anchorView); popUp.showAsDropDown(anchorView); popUp.update(); And its perfectly works on Android Version < Android Nougat. But in Android Nougat, the popup is being displayed at the top of the screen instead of relative to the anchor view. 回答1: It seems a bug in android 7.0. But you

Dismiss PopupWindow on touch outside popup, without using deprecated constructor

杀马特。学长 韩版系。学妹 提交于 2019-12-03 10:41:42
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.setBackgroundDrawable(new BitmapDrawable()); popup.setOutsideTouchable(true); popup.showAsDropDown(v); What I had