Better RTL support

This commit is contained in:
M66B 2016-03-28 12:54:03 +02:00
parent 27ccc7ee45
commit b9300f91e1
1 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
actionView.getLocationOnScreen(location);
Toast toast = Toast.makeText(ActivityMain.this, R.string.msg_queue, Toast.LENGTH_LONG);
toast.setGravity(
Gravity.TOP | Gravity.LEFT,
Gravity.TOP | Gravity.START,
location[0] + ivQueue.getLeft(),
Math.round(location[1] + ivQueue.getBottom() - toast.getView().getPaddingTop()));
toast.show();
@ -234,7 +234,7 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
actionView.getLocationOnScreen(location);
Toast toast = Toast.makeText(ActivityMain.this, R.string.msg_metered, Toast.LENGTH_LONG);
toast.setGravity(
Gravity.TOP | Gravity.LEFT,
Gravity.TOP | Gravity.START,
location[0] + ivMetered.getLeft(),
Math.round(location[1] + ivMetered.getBottom() - toast.getView().getPaddingTop()));
toast.show();