title: How to write on the android status bar
body: <p>I'm trying to do something like this in my <code>onCreate()</code> method.</p>
  
  <p><a href="https://i.stack.imgur.com/lWsJv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lWsJv.png" alt="enter image description here"></a></p>
  
  <pre><code>@TargetApi(21)
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      getWindow().getDecorView().setBackgroundColor(Color.parseColor("#444444"));
      getWindow().setStatusBarColor(Color.parseColor("#565656"));
      getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#4d4d4d")));
      writeOnStatusBar("Hello world");
  }
  </code></pre>