This is my .java file in src:
package com.wao.texttime;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class TextTime extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv1 = (TextView) findViewById(R.id.TextView01);
tv1.setText("Good Morning");
TextView tv2 = (TextView) findViewById(R.id.TextView02);
tv1.setText("Good Afternoon");
}
}
I want the TextView to display the different texts depending on what time it is. F.ex. between 08:45-10:45 and so forth. I am very new to coding both for android and in java and I'm trying to figure out how I can make the rules for which text to display. Do you have any suggestions?