title: Beautiful Stroked Text in Android
body: <p>I know how to stroke text using custom views(EditText or TextView) but I couldn't able to achieve something beautiful like this one, which is done using Photoshop. And yes, it has outer shadow too. <img src="https://i.stack.imgur.com/4qurS.png" alt="Stroked Text in Photoshop"></p>
  
  <p>What I have done so far is adjusting stroke width and stroke join style. However, if I increase the stroke width, the stroke took place the whole text.
  As far as I have searched, there is a library called <a href="https://github.com/m5/MagicTextView" rel="noreferrer">MagicTextView</a> but it also couldn't give the result like that above.</p>
  
  <p><strong>Update</strong>: I have tweaked things based on suggestion by @pskink. It works now. However I can't drag anymore. If I drag that EditText, there is some weird lines showed up like this. 
  <img src="https://i.stack.imgur.com/vNKfd.jpg" alt="Weird line above text view"></p>
  
  <p>Here is the code:</p>
  
  <pre><code>@Override public void onDraw(Canvas canvas) {
    final int x = this.getLeft();
    final int y = this.getBottom();
  
    mText = this.getText().toString();
  
    p.setStrokeWidth(30);
    p.setStyle(Style.STROKE);
    p.setStrokeJoin(Join.ROUND);
    p.setColor(0xffffffff);
  
    canvas.drawText(mText, x, y, p);
  
    p.setStyle(Style.FILL);
    p.setColor(0xff000000);
  
    canvas.drawText(mText, x, y, p);
  }
  </code></pre>