Try to fix

This commit is contained in:
Victor Shcherb 2014-06-20 00:09:29 +02:00
parent 1f8b1c60c0
commit 7034190f73

View file

@ -660,16 +660,31 @@ public class OsmandApplication extends Application {
return targetPointsHelper;
}
public void showShortToastMessage(int msgId, Object... args) {
AccessibleToast.makeText(this, getString(msgId, args), Toast.LENGTH_SHORT).show();
public void showShortToastMessage(final int msgId, final Object... args) {
uiHandler.post(new Runnable() {
@Override
public void run() {
AccessibleToast.makeText(OsmandApplication.this, getString(msgId, args), Toast.LENGTH_SHORT).show();
}
});
}
public void showToastMessage(int msgId, Object... args) {
AccessibleToast.makeText(this, getString(msgId, args), Toast.LENGTH_LONG).show();
public void showToastMessage(final int msgId, final Object... args) {
uiHandler.post(new Runnable() {
@Override
public void run() {
AccessibleToast.makeText(OsmandApplication.this, getString(msgId, args), Toast.LENGTH_LONG).show();
}
});
}
public void showToastMessage(String msg) {
AccessibleToast.makeText(this, msg, Toast.LENGTH_LONG).show();
public void showToastMessage(final String msg) {
uiHandler.post(new Runnable() {
@Override
public void run() {
AccessibleToast.makeText(OsmandApplication.this, msg, Toast.LENGTH_LONG).show();
}
});
}
public SQLiteAPI getSQLiteAPI() {