1

I have the following statement

String value = android.provider.Settings.System.getString(getContentResolver(), android.provider.Settings.System.TIME_12_24);

It works fine with my Nexus 7 (Android 4.3) and my S3 (CM10.2) but it returns null in the emulator with Android 2.3.3.

Everything used in that statement is there since API Level 1. Any idea why does it return null or how can I check the time confifguration (12/24h) instead?

4

1 回答 1

3

试试这个: boolean is24 = DateFormat.is24HourFormat(context);

于 2014-03-06T20:29:09.967 回答