You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jan Velecký (JIRA)" <ji...@apache.org> on 2013/03/03 21:41:13 UTC
[jira] [Created] (CB-2603) Toast notification API for Android
Jan Velecký created CB-2603:
-------------------------------
Summary: Toast notification API for Android
Key: CB-2603
URL: https://issues.apache.org/jira/browse/CB-2603
Project: Apache Cordova
Issue Type: Wish
Components: Android
Reporter: Jan Velecký
Assignee: Joe Bowser
Priority: Minor
This is not hard change in cordova sources i think. I use this primitive class with addJavascriptInterface:
public class MyToaster {
private DroidGap mGap;
private Toast toastik;
public MyToaster(DroidGap gap) {
mGap = gap;
}
public void show(String message, boolean lng) {
(toastik = Toast.makeText(mGap, message, lng ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT)).setGravity(Gravity.CENTER, 0, 0);
toastik.show();
}
}
So i can use long i short during toast notifications. In results, user have more native UI feel on Android and on the other hand – it's very practise for text notifications of information character.
With this, PhoneGap will be again better. :-)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira