how to perform action when the floating label change the state in TextInputLayout?
<p>I have a Edittext inside the TextInputLayout. I want to do that when i click on this textinputlayout then calender is also open.but in my case the floating label change the state and when i click on the edittext then the calender is opening.but i don't want to do that i want that when the user clicks at the first time on the TextInputLayout the floating label change and the calender is also open with it.can anyone tell me how can i do this ??</p>

<p>This is my xml :-</p>

<pre><code>&lt;android.support.design.widget.TextInputLayout
                    android:id="@+id/til_dob"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="@dimen/_10sdp"
                    android:clickable="true"
                    android:textColorHint="@color/colorBlack"&gt;

                    &lt;EditText
                        android:id="@+id/DateOfBirth"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/date"
                        android:inputType="none"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:textSize="15sp" /&gt;
                &lt;/android.support.design.widget.TextInputLayout&gt;
</code></pre>

<p>And this is my on click listner on the edittext :-</p>

<pre><code> @Override
    public void onClick(View view) {
        switch (view.getId()) {

            case R.id.DateOfBirth:

                new DatePickerDialog(getContext(), date, myCalendar
                        .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
                        myCalendar.get(Calendar.DAY_OF_MONTH)).show();

                break;

         }
    }
</code></pre>