Standardize edtitext type date

1

I would like to know how I change the format of EditText type date

android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:inputType="date"        
        android:ems="10"
        android:id="@+id/dtfinal"
        android:layout_below="@+id/textView6"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:text="@string/lbldtfinal"/>

With this format, when the user types the date, the format that appears on the screen and is saved to my program is: 14042016. I would like it to be automatically added when the user type the date, , when he typed the 14th, appeared on the screen for him 14- and then the result of what he typed would be 14-04-2016. I know I have to change something in xml , and I know there is calendar and datapicker , but I'd like something simpler like this example above. But examples with datapicker would be good for future changes as long as I explained how I should use it.

    
asked by anonymous 14.04.2016 / 12:55

0 answers