title: how to add date and time to a textview in android
body: <p>I am developing an application where I need to show the date and time in a <code>TextView</code>. How can I implement this?</p>
  
  <p>Do I need to implement the Concept in the XML file or in the java file?</p>
  
  <p>My XML file contains a <code>Textview</code> such as:</p>
  
  <pre><code>&lt;TextView
              android:id="@+id/DATE"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:text=""
              android:gravity="center"
              android:textAppearance="?android:attr/textAppearanceMedium"
              android:textSize="30dp" /&gt;
  </code></pre>
  
  <p>What are the steps I need to take?</p>
  
  <p>Guide me.</p>