How would I display the current date in the text of a EditText widget dynamically at runtime?
Thanks patrick
How would I display the current date in the text of a EditText widget dynamically at runtime?
Thanks patrick
With updating? Then you'll need a service or something updating the text continuesly!
If your EditText is declared in the xml file, you have to retrieve it in the code like this
EditText editText = (EditText) findViewById( R.id.your_edittext_id );
Then you can easily update it with the current date
SimpleDateFormat sdf = new SimpleDateFormat( "yyyy/MM/dd" );
editText.setText( sdf.format( new Date() ));