Code example for TimePickerDialog

Methods: updateTime

0
String temp[] = initStr.split(":");
		initHour = Integer.valueOf(temp[0]);
		initMinute = Integer.valueOf(temp[1]);
    	 
        timePicker.updateTime( initHour, initMinute );
         
    } 
     
    @Override 
    public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
    	Log.i(TAG, "onPreferenceTreeClick()");
        if (preference == mStartTimePref) {
        	tpIndex = 0;
            showDialog(DIALOG_TIMEPICKER);
        }else if(preference == mStopTimePref){
        	tpIndex = 1;
        	showDialog(DIALOG_TIMEPICKER);
        } 
        return false; 
Stop searching for code, let great code find you!  Add Codota to your java IDE