title: Custom PinEntryView - default symbols
body: <p>I have a custom EditText providig PinEntry functionality looking like this:</p>
  
  <pre><code>class PinEntryView : EditText {
  
  private var mSpace = 15f
  private var mCharSize = 0f
  private var mNumChars = 4f
  private var mLineSpacing = 8f
  private val XML_NAMESPACE_ANDROID = "http://schemas.android.com/apk/res/android"
  private var mClickListener: View.OnClickListener? = null
  private var mLineStroke = 1f
  private var mLinesPaint: Paint? = null
  private var mOnPinEnteredListener: OnPinEnteredListener? = null
  
  private fun updateColorForLines(next: Boolean) {
      if (isFocused) {
          mLinesPaint!!.color = getColor(context, android.R.color.transparent)
          if (next) {
              mLinesPaint!!.color = getColor(context, R.color.edit_text_background)
          }
      } else {
          mLinesPaint!!.color = getColor(context, android.R.color.transparent)
      }
  }
  
  constructor(context: Context) : super(context)
  
  constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
      init(context, attrs)
  }
  
  constructor(
      context: Context, attrs: AttributeSet,
      defStyleAttr: Int
  ) : super(context, attrs, defStyleAttr) {
      init(context, attrs)
  }
  
  private fun init(context: Context, attrs: AttributeSet) {
      val multi = context.resources.displayMetrics.density
  
      mLineStroke *= multi
      mLinesPaint = Paint(paint)
      mLinesPaint!!.strokeWidth = mLineStroke
  
      mSpace *= multi
      mLineSpacing *= multi
      val mMaxLength = attrs.getAttributeIntValue(
          XML_NAMESPACE_ANDROID,
          "maxLength",
          6
      )
  
      paint.color = getColor(context, android.R.color.white)
  
      mNumChars = mMaxLength.toFloat()
  
      super.setCustomSelectionActionModeCallback(
          object : ActionMode.Callback {
              override fun onPrepareActionMode(
                  mode: ActionMode,
                  menu: Menu
              ): Boolean {
                  return false
              }
  
              override fun onDestroyActionMode(mode: ActionMode) {}
  
              override fun onCreateActionMode(
                  mode: ActionMode,
                  menu: Menu
              ): Boolean {
                  return false
              }
  
              override fun onActionItemClicked(
                  mode: ActionMode,
                  item: MenuItem
              ): Boolean {
                  return false
              }
          })
  
      super.setOnClickListener { v -&gt;
          setSelection(text.length)
          if (mClickListener != null) {
              mClickListener!!.onClick(v)
          }
      }
  }
  
  override fun setOnClickListener(l: OnClickListener) {
      mClickListener = l
  }
  
  override fun onDraw(canvas: Canvas) {
      val availableWidth = width - paddingRight - paddingLeft
      mCharSize = if (mSpace &lt; 0) {
          (availableWidth / (mNumChars * 2 - 1))
      } else {
          (availableWidth - mSpace * (mNumChars - 1)) / mNumChars
      }
  
      var startX = paddingLeft.toFloat()
      val bottom = height.toFloat() - paddingBottom.toFloat()
  
      val text = text
      val textLength = text.length
      val textWidths = FloatArray(textLength)
      paint.getTextWidths(getText(), 0, textLength, textWidths)
  
      for (i in 0 until mNumChars.toInt()) {
          updateColorForLines(i == textLength)
          canvas.drawRoundRect(
              startX, 0f, startX + mCharSize, height.toFloat(), 5f, 5f, mLinesPaint
          )
          if (text.length &gt; i) {
              val middle = startX + mCharSize / 2
              canvas.drawText(
                  "******",
                  i,
                  i + 1,
                  middle - textWidths[0] / 2,
                  bottom - mLineSpacing,
                  paint
              )
          }
          startX += if (mSpace &lt; 0) {
              mCharSize * 2
          } else {
              mCharSize + mSpace
          }
      }
  }
  
  override fun onTextChanged(text: CharSequence, start: Int, lengthBefore: Int, lengthAfter: Int) {
      if (mOnPinEnteredListener != null &amp;&amp; text.length.toFloat() == mNumChars) {
              mOnPinEnteredListener!!.onPinEntered(text)
      }
  }
  
  fun setOnPinEnteredListener(l: OnPinEnteredListener) {
      mOnPinEnteredListener = l
  }
  
  interface OnPinEnteredListener {
      fun onPinEntered(str: CharSequence)
  }
  }
  </code></pre>
  
  <p>I followed this tutorial: <a href="https://medium.com/@ali.muzaffar/building-a-pinentryedittext-in-android-5f2eddcae5d3" rel="nofollow noreferrer">https://medium.com/@ali.muzaffar/building-a-pinentryedittext-in-android-5f2eddcae5d3</a></p>
  
  <p>And I am getting behavior showed on picture: <a href="https://i.stack.imgur.com/cBZAj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cBZAj.png" alt="enter image description here"></a></p>
  
  <p>But I would like to have a behavior as shown here: <a href="https://i.stack.imgur.com/pqtHv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pqtHv.png" alt="enter image description here"></a></p>
  
  <p>How can I achieve that? How can I add those default dots/symbols? I tried adding it as a hint or default text, but it does not work because of my onDraw function</p>