Android获取系统时间

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");
        }

你可能感兴趣的:(android,String)