title: How to Align Android Toast as Centered
body: <h2 id="how-to-align-android-toast-as-centered">How to Align Android Toast as Centered</h2>
  <p>I saw many related questions in StackOverflow and All over the Internet, but they align the toast centered to the display. But, <strong>I want to display the text-centered to my toast!</strong></p>
  <hr />
  <p><a href="https://i.stack.imgur.com/CMoM6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CMoM6.jpg" alt="Example Image" /></a></p>
  <h2 id="my-code-to-display-my-toast"><strong>My Code to display my Toast</strong></h2>
  <pre><code>   timeout_on = Toast.makeText(getBaseContext(), &quot;Screen Timeout is Enabled (Your screen will doesn't sleep from now!)&quot;, Toast.LENGTH_SHORT);
     timeout_on.show();
  </code></pre>