系统时间为12小时制,进入记事本保 存一条记录,记录时间以24小时制显示
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
系统时间为12小时制,进入记事本保存一条记录,记录时间以24小时制显示
[SOLUTION]
该信息显示为24小时制是design 的行为,如果贵司想要修改可以参考以下信息。
1.format格式的资源 如,values/string.xml
<string name="done_time_format">Done at %Y-%m-%d %H:%M</string>
2. timeFormat的地方在Utils.java, 可以自行修改timeFormat。
public static String getDateText(Context context, long dateMillis, int type) {
...
else if (type == DATE_TYPE_COMPLETE) { // get complete date
if (dateMillis <= 0) {
return null;
}
timeFormat = context.getResources().getString(R.string.done_time_format);
}
...
}
系统时间为12小时制,进入记事本保存一条记录,记录时间以24小时制显示
[SOLUTION]
该信息显示为24小时制是design 的行为,如果贵司想要修改可以参考以下信息。
1.format格式的资源 如,values/string.xml
<string name="done_time_format">Done at %Y-%m-%d %H:%M</string>
2. timeFormat的地方在Utils.java, 可以自行修改timeFormat。
public static String getDateText(Context context, long dateMillis, int type) {
...
else if (type == DATE_TYPE_COMPLETE) { // get complete date
if (dateMillis <= 0) {
return null;
}
timeFormat = context.getResources().getString(R.string.done_time_format);
}
...
}
