Play directly in the method
Calendar C =calendar.getinstance (); //get Current yearString myear = string.valueof (c.Get(calendar.year)); //Get Current MonthString mmonth = string.valueof (c.Get(Calendar.month) +1); //get the date number for the current monthString Mday = string.valueof (c.Get(Calendar.day_of_month)); //get the current week he's got the numbers. 1 2 3 4 5 6 So, based on the numbers,String Mway = string.valueof (c.Get(Calendar.day_of_week)); if("1". Equals (Mway)) {Mway="days"; } Else if("2". Equals (Mway)) {Mway="a"; } Else if("3". Equals (Mway)) {Mway="two"; } Else if("4". Equals (Mway)) {Mway="three"; } Else if("5". Equals (Mway)) {Mway="Four"; } Else if("6". Equals (Mway)) {Mway="Five"; } Else if("7". Equals (Mway)) {Mway="Six"; }
TextView Assignment Date.settext (myear+"."+ Mmonth +"."+ Mday +"Week"+ mway+ "" + "Today");
Effect:
Android always displays the current time