PhoneGap-iOS, how to show dialog with red button? - ios

I am working with Phonegap on iOS, and here is the codes to show the dialog:
navigator.notification.confirm(
'Which color do you like most?'
, confirmCB
, 'Title | Confirm'
, 'Green,Red'
);
I want to show a confirmation dialog with red cancel button but I don't know how. Please helps.

That is not possible with phonegap.
navigator.notification.confirm uses the native UIAlertView, and the UIAlertView buttons are blue/gray, and the cancel button darker blue/gray
You can try to create a plugin with this library BlockAlerts And ActionSheets
Or use a javascript/css alert replacements

Related

How to show "Back" option in IOS devices for InappBrowsers in Ionic 5?

I am using InAppBrowser Plugin in my Ionic 5 project . My expectation is to have a back button visible in InappBrowser in order to return to original app (which is usually present in Ios) , but as per my current implementation the Back option is not visible in ios device.
below is the code I am using -
this.inAppBrowser.create(url, '_blank', { location: 'no', hardwareback: 'yes', fullscreen: 'no' });
In iOS there is no "back" button but "Done" button (which is the same, takes you back to the app). It should already display, you can't disable it, so you should see a blue "Done" button.
If location is false, the Done button does not appear. Then you need to set the option "footer" to true, to display the Done button at the bottom.
With the options closebuttoncolor and closebuttoncaption you can change the text and the color, so change the text to "Back".

How to addd an 'close' button to a pdf loaded from within an app by uiwebview

We can use UIWEBVIEW to create a loading mechanism for viewing a pdf file when called in our app and we have successfully put in a 'close' or 'done' button that allows us to exit the pdf and return to the app. Our app is a website compiled using Xcode 5.1.
PROBLEM: Our 'close' / 'done' button appears on every page of our website app rather than only when the pdf is loaded. What we want is for the button to only appear when the pdf is loaded and when pressed, we can return to the app and the button disappears.
Any help very very much appreciated.
You can hide close and done button in other view like this
[closeBtn setHidden:YES];
[doneBtn setHidden:YES];
Make sure your other class able to access these buttons
if YOu Use PHONEGAP, you must use AppInBrowser
you can code like this
a href="javascript:void(0)" onclick="open_pdf('your.pdf');"
function open_pdf(url)
{ var ref = window.open(url, '_blank', 'location=no'); }
Follow :
Here's a link! And a reference-style link to [a panda][1].

Is it possible to remove URL in popup

I have an application where I have used javascript alert popup box.
When I open that in smart device like iPhone then it shows the URL on top as shown below:
So is there a way to remove that URL.?
If you could find a way to set the delegate of that UIAlertView you can try to use
(void)willPresentAlertView:(UIAlertView *)alertView
You can then change the title from there if this would work.

How to add fields to a Dialog

Iam new in BlackBerry programming. I want to make a Dialog with 2 inputtext, 2 labels and OK and Cancel button something like this:
|PIN|:|inputtext|
|Bumber|:|inputtext|
|Button(OK)||Button(Cancell)|
Your requirement is nothing but "Custom Popup"
For this the below link will help you:
CustomPopupScreen#WordPress
or
CustomPopupScreen#BlogSpot
Check this and change according to your requirement.

Unable to use back button property in Popup screen in blackberry

In my application , am using popup screen, that implements FieldChangeListener.I used close() method for back button. but its not working.
Can some give sample code without using KeyListener,TrackwheelListener ?
if u want to close the popup screen on back button try this:
UiApplication.getUiApplication().
popScreen(UiApplication.getUiApplication().getActiveScreen());

Resources