I'm currently building the mobile interfaces for my GWT app and I noticed that using Window.alert("message") invoked the phones native pop up panel. I was wondering if is possible to do this but have different buttons (rather than just "okay") in the pop up? This would be a lot simpler than writing a separate pop up panel.
You can not change the native popup behavior. you have to use PopUpPanel and DialogBox for that.
You can have OK and Cancel buttons if you use Window.confirm() (or Window.prompt()). No other options for native pop-up.
Related
I want to create a button can move to any position like iPhone Style (Virtual Home Button) in Flutter but I don't know any packages or any library can do it. Moreover, I'd like the button to be able to show along with a specific app, eg. dial-up UI. If I deploy to desktop, will its behavior the same with mobile?
ios virtual home button
show button along with dial-up UI
Hope you guys help me ways to create it.
I have tried with unicorndial, floating_bubble, popup window, etc.
but all of them are widget within flutter app, instead of system-wide.
Sorry you can't really create anything like that outside of your App context. Apple is very strict in situations like this.
You can implement this sort of feature in Android by using Floating Service. But for Apple it's a NO NO.
I am working on xamarin.forms. I am using Master detail page. In menupage of MasterDetailPage I have some menu items that are listed. At the bottom of the Menu list I placed a button on menu page. Now I need to open a popup on click of that button. I am trying with PopupLayout but not able to get any success.
Please tell me how I can open a custom popup box at the click of the button that is placed in menu page?
Regards,
Anand Dubey
Without going into separate, native projects for all platforms you are targeting (such as Android, iOS, UWP...), you cannot pop out custom UI content over existing pages in Xamarin.Forms out of the box. You would need to bring in additional references or get creative with the AbsoluteLayout control.
Here are a few options you have:
Simple popup with message and or option selection
If all you need is a simple popup message or a list of buttons, you should look into the native DisplayAlert and DisplayActionSheet methods. They are built into Xamarin.Forms and work really well for these simple cases.
More complex popup dialogs
For anything more complex than that, there is the excellent UserDialogs project: ACR UserDialogs github page
It will give you support for various loading dialogs, date, time pickers, action sheet, success/info/error toasts and more.
Fully custom UI markup with AbsoluteLayout
There is a technique where by you prepare the underlying page with a root absoltue layout, which enables you to dynamically add new UI on top of all other controls on your page. This is fiddly and can ruin your performance if you are not careful. This is also the approach that the PopupLayout control that you mentioned uses. If done properly, this can be a good solution, but I don't recommend it as it involves additional complexity on each page that hosts the popup content.
Fully custom UI popup on native projects
Your most flexible option, as always, is to fall back to the native projects. This would involve coding up the popup logic on each separate platform that you are targeting, then using DependencyService (or one of the other techniques) to call into it from the shared project. For this you should look at samples and tutorials for popups on separate native platforms as it gets pretty broad and goes way outside the topic of this question.
I'm using gwtmobile for implementing an iOS app, and I would like to use menu dialog like Facebook.app (when you click to show notification), so, I may insert some of menu-like content and handle it.
Are there some libraries that I can use?
In JavaScript when I open a popup I can disable the adressbar, so the user can't enter something.
Is there a similar option to disable the adressbar in gwt?
Short of doing exactly that same thing and loading your GWT app within that popup window, no. You could potentially have a page that is NOT part of your GWT application open a new window with whatever options, then set the URL of that window to your GWT app's address. There's no way (AFAIK) to hide the address bar in the current window.
I have not worked in this area much. Actually I could not understand whether you are trying to disable the popup's address bar or current parent window's address bar.
But what ever is possible in javascript that can be done in gwt. So if you know what to do using javascript for your requirement then you can go for JSNI. No need to look for GWT based solution.
Between I like your stackoverflow display name :-)
Thanks
I need to find out how to make the menu that appears in mobile safari on the iphone/touch when you tap & hold an element appear on a single tap without having to hold. how would i do this? preferably i would use webkit & no js.
UIWebView does not does not call any methods until a link is actually activated, and it does not expose any information about its subviews. There is no way to do with current SDK, you should file a bug with Apple if you need this functionality.