Android popup window not filling screen size?

Here you can’t use layout which is in your popup window xml. You have to use any View from main layout. Right now I am using FloatingButton as a View to showAtLocation. fabButton = (ImageButton) findViewById(R.id.activity_profileView_FAB); fabButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View v) { initiatePopupWindow(v); } }); private void initiatePopupWindow(View v) { try … Read more

Using JQuery to Access a New Window’s DOM

In this case you are trying to access a dom wich has no jQuery enhancement. You need to first load a jquery.js into this document. If done the syntax would be. var popup = window.open(‘/some/url.html’); popup.document.$(‘body’).html(‘test’); But be very careful, in multi document management and communication are many bugs and inconveniences between the many different … Read more

Qt 4: Move window without title bar

Try this to move the window manually: void PopupWindow::mousePressEvent(QMouseEvent *event){ mpos = event->pos(); } void PopupWindow::mouseMoveEvent(QMouseEvent *event){ if (event->buttons() & Qt::LeftButton) { QPoint diff = event->pos() – mpos; QPoint newpos = this->pos() + diff; this->move(newpos); } } And declare QPoint mpos somewhere.

How to show PopupWindow at special location?

Locating an already displayed view is fairly easy – here’s what I use in my code: public static Rect locateView(View v) { int[] loc_int = new int[2]; if (v == null) return null; try { v.getLocationOnScreen(loc_int); } catch (NullPointerException npe) { //Happens when the view doesn’t exist on screen anymore. return null; } Rect location … Read more

Add a UIView above all, even the navigation bar

You can do that by adding your view directly to the keyWindow: UIView *myView = /* <- Your custom view */; UIWindow *currentWindow = [UIApplication sharedApplication].keyWindow; [currentWindow addSubview:myView]; UPDATE — For Swift 4.1 and above let currentWindow: UIWindow? = UIApplication.shared.keyWindow currentWindow?.addSubview(myView) UPDATE for iOS13 and above keyWindow is deprecated. You should use the following: UIApplication.shared.windows.first(where: … Read more