is Hour to 24 range - Android java.util

Android examples for java.util:Date Time

Description

is Hour to 24 range

Demo Code


//package com.java2s;

import android.content.ContentResolver;
import android.content.Context;

public class Main {
    public static boolean isHourto24(Context context) {
        ContentResolver cr = context.getContentResolver();
        String strFormatTime = android.provider.Settings.System.getString(
                cr, android.provider.Settings.System.TIME_12_24);
        if (null != strFormatTime && strFormatTime.equals("24")) {
            return true;
        } else {/*from ww  w  .  ja v a2  s  . c o  m*/
            return false;
        }
    }
}

Related Tutorials