List<String> list = new ArrayList<String>(); Calendar ca = Calendar.getInstance(Locale.CHINESE); int start = ca.getFirstDayOfWeek(); int end = ca.getMaximum(Calendar.DAY_OF_WEEK); for (int i = start; i <= end; i++) { ca.set(Calendar.DAY_OF_WEEK, i); String aString=ca.getTime().toString(); String dateString; if (aString.subSequence(8, 9).equals("0")) { dateString=aString.substring(9, 10); }else { dateString=aString.substring(8, 10); } list.add("" + dateString); } String da[] = list.toArray(new String[list.size()]); date1.setText(da[0]); date2.setText(da[1]); date3.setText(da[2]); date4.setText(da[3]); date5.setText(da[4]); date6.setText(da[5]); date7.setText(da[6]);
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。