Code example for DateFormatSymbols

0
            if (mAmPmTextView != null && tf != null) {
                mAmPmTextView.setTypeface(tf);
            } 
 
            String[] ampm = new DateFormatSymbols().getAmPmStrings();
            mAmString = ampm[0];
            mPmString = ampm[1];
        } 
 
        void setShowAmPm(boolean show) {
            if (mAmPmTextView != null) {
                mAmPmTextView.setVisibility(show ? View.VISIBLE : View.GONE);
            } 
        } 
 
        void setIsMorning(boolean isMorning) {
            if (mAmPmTextView != null) {
                mAmPmTextView.setText(isMorning ? mAmString : mPmString);
            } 
        } 
    }