Skip to content

Commit

Permalink
Merge branch '#855_v2_doubleBackButtonPressed' into tw_develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanGarf committed Jan 5, 2020
2 parents 33c87b2 + 5bb9560 commit b189c1f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import com.crashlytics.android.Crashlytics;
Expand Down Expand Up @@ -302,7 +303,13 @@ public void onClick(View v) {
mToast = Toast.makeText(getApplicationContext(),
R.string.double_back_press_exit_msg,
Toast.LENGTH_SHORT);
mToast.setGravity(Gravity.CENTER,0,0);

// Align-Center text inside the Toast
TextView toastTextView = (TextView) mToast.getView()
.findViewById(android.R.id.message);
if (toastTextView != null) {
toastTextView.setGravity(Gravity.CENTER);
}
}

@Override
Expand Down

0 comments on commit b189c1f

Please sign in to comment.