Well, after much profanity, I've cobbled this together from a few places and then had to guess my way through the rest. This code works. If you have red labels after pasting this in be sure to click on them, press ALT-Enter, and then choose import class (java.util). I've included the entire text of the two files, so if you create a new blank project (empty activity), be sure not to duplicate the default lines at the top of each file.
Now to figure out how to replace that string with date information. That should be some simple straightforward programming instead of having to divine the magic password to make simple variable display work. BTW the string abc is the important part down there.
Good Luck!
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="
http://schemas.android.com/apk/res/android"
xmlns:app="
http://schemas.android.com/apk/res-auto"
xmlns:tools="
http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="info.computerman.showvariable.MainActivity">
<TextView
android:id="@+id/textview1"
android:layout_column="0"
android:layout_row="0"
android:text= ""
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
</android.support.constraint.ConstraintLayout>
_________________________________________________________________________________
MainActivity.java
package info.computerman.showvariable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
String abc ="Alphabet";
TextView textView1;
//in your OnCreate() method
textView1 = (TextView)findViewById(R.id.textview1);
textView1.setText(abc);
}
}