现在的位置: 首页 > 综合 > 正文

【HR小时制】如何获取Android系统时间的小时制

2017年12月05日 ⁄ 综合 ⁄ 共 349字 ⁄ 字号 评论关闭
ContentResolver cv = this.getContentResolver();
		String strTimeFormat = android.provider.Settings.System.getString(cv,
				android.provider.Settings.System.TIME_12_24);

		if (strTimeFormat.equals("24"))
		{
			Log.i("activity", "24");
			//tv.setText("本机时间设定为24小时制");
		}
		
		if(strTimeFormat.equals("12"))
		{
			Log.i("activity", "12");
			//tv.setText("本机时间设定为12小时制");
		}


下载连接(免费):获取Android系统时间的小时制

抱歉!评论已关闭.