diff options
author | lado <herrlado@gmail.com> | 2012-01-25 00:27:00 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2012-01-25 00:27:00 +0100 |
commit | e2bf873e9f5d1011cbcd240242507b5862d79558 (patch) | |
tree | db43d39e7c1344bb9242cef802912145b42b6d2b | |
parent | 196b2c36be18cf43d3b36116b89ffbe3dd9f2728 (diff) | |
download | vdr-manager-e2bf873e9f5d1011cbcd240242507b5862d79558.tar.gz vdr-manager-e2bf873e9f5d1011cbcd240242507b5862d79558.tar.bz2 |
position toast on center
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java index c88ba8c..39f03b3 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/BaseActivity.java @@ -4,6 +4,7 @@ import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; +import android.view.Gravity; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -193,11 +194,13 @@ public abstract class BaseActivity<Result, T extends ListView> extends ICSBaseAc // } protected void say(int res) { - Toast.makeText(this, res, Toast.LENGTH_SHORT).show(); + say(this.getString(res)); } protected void say(String msg) { - Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); + Toast t = Toast.makeText(this, msg, Toast.LENGTH_SHORT); + t.setGravity(Gravity.CENTER, 0, 0); + t.show(); } protected boolean noConnection(SvdrpEvent event) { |