title: Android using MaterialDatePicker and TextInputLayout
body: <p>I am new to android development and currently trying to integrate material design into my app. 
  I would like to evaluate a simple form, for this purpose I used the components <code>com.google.android.material.textfield.TextInputLayout</code> and <code>com.google.android.material.textfield.TextInputEditText</code> for user input. Besides the text input, I need a date, which I want to read with a <code>MaterialDatePicker</code>.</p>
  
  <p>I tried to display the <code>MaterialDatePicker</code> with <code>OnFocusChangeListener</code>, this works too, but I have two problems. </p>
  
  <ol>
  <li>the display is a little bit delayed because first a keyboard is opened which is closed immediately after calling the <code>MaterialDatePicker</code>.</li>
  <li>when the display is closed with the Back button, the focus is still on TextInputLayout. So I would have to change the focus first to open a <code>MaterialDatePicker</code> again. </li>
  </ol>
  
  <p>This is how I implemented the <code>OnFocusChangeListener</code></p>
  
  <pre><code>@Override
  public void onFocusChange(View view, boolean selected) {
  
      if( view.getId() == R.id.myId&amp;&amp; selected ){
  
          MaterialDatePicker.Builder builder = MaterialDatePicker.Builder.datePicker();
          MaterialDatePicker picker = builder.build();
          picker.show( this.getParentFragmentManager(), "DATE_PICKER" );
      }
  }
  </code></pre>
  
  <p>Are there alternative components of Material Design that are better suited for the presentation?  I would like to keep the behavior within the form, so as soon as the date is entered by the user, a small label should be displayed above, like this:</p>
  
  <p><a href="https://i.stack.imgur.com/j3BL4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j3BL4.png" alt="enter image description here"></a></p>
  
  <p>Thank you for your help.</p>