Reputation: 2579
I want to show a popup similar to this one on Android using PhoneGap.Is this a native popup? or is it designed by Twitter?
I can't find its name on the internet
Using JavaScript:alert
and navigator.notification.alert(message, alertCallback, [title], [buttonName])
shows the default black dialog.
Upvotes: 3
Views: 1670
Reputation: 7798
That is the native dialog from the Light Holo Theme, twitter definitely hasn't built that. You just need to set the correct theme for your app. You can't do that on the HTML5 layer, but it's very easy to set in your manifest.
Assuming that you are running on any device with android 3.0 or higher you can set up your app theme to Holo.Light in your manifest file:
And if you want to target lower versions you can take a look on this question.
And don't use javacript.alert()
, that will display an ugly title in your dialog, always use phonegap notification for native dialogs.
Upvotes: 4