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; return targetPointsHelper;
} }
public void showShortToastMessage(int msgId, Object... args) { public void showShortToastMessage(final int msgId, final Object... args) {
AccessibleToast.makeText(this, getString(msgId, args), Toast.LENGTH_SHORT).show(); 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) { public void showToastMessage(final int msgId, final Object... args) {
AccessibleToast.makeText(this, getString(msgId, args), Toast.LENGTH_LONG).show(); uiHandler.post(new Runnable() {
@Override
public void run() {
AccessibleToast.makeText(OsmandApplication.this, getString(msgId, args), Toast.LENGTH_LONG).show();
}
});
} }
public void showToastMessage(String msg) { public void showToastMessage(final String msg) {
AccessibleToast.makeText(this, msg, Toast.LENGTH_LONG).show(); uiHandler.post(new Runnable() {
@Override
public void run() {
AccessibleToast.makeText(OsmandApplication.this, msg, Toast.LENGTH_LONG).show();
}
});
} }
public SQLiteAPI getSQLiteAPI() { public SQLiteAPI getSQLiteAPI() {