示例#1
0
 public final void showInvisibleViews() {
   if (View.INVISIBLE == mHeaderText.getVisibility()) {
     mHeaderText.setVisibility(View.VISIBLE);
   }
   if (View.INVISIBLE == mHeaderProgress.getVisibility()) {
     mHeaderProgress.setVisibility(View.VISIBLE);
   }
   if (View.INVISIBLE == mHeaderImage.getVisibility()) {
     mHeaderImage.setVisibility(View.VISIBLE);
   }
   if (View.INVISIBLE == mSubHeaderText.getVisibility()) {
     mSubHeaderText.setVisibility(View.VISIBLE);
   }
 }
示例#2
0
  private void setSubHeaderText(CharSequence label) {
    if (null != mSubHeaderText) {
      if (TextUtils.isEmpty(label)) {
        mSubHeaderText.setVisibility(View.GONE);
      } else {
        mSubHeaderText.setText(label);

        // Only set it to Visible if we're GONE, otherwise VISIBLE will
        // be set soon
        if (View.GONE == mSubHeaderText.getVisibility()) {
          mSubHeaderText.setVisibility(View.VISIBLE);
        }
      }
    }
  }
    @Override
	public void updateClockTime(String newtime) {
		if ((mTimeTrackerTextView != null)
				&& (mTimeTrackerTextView.getVisibility() == View.VISIBLE)) {
			
			TimeCounter currentServiceRunningTime = AppUtility.getAppUtilityInstance().getCurrentRunningServiceTimeCounter();
			if(currentServiceRunningTime != null && AppUtility.getAppUtilityInstance().isApplicationStartAfterCrash()) {
				long currentSystemTime = currentServiceRunningTime.getCurrentSystemTime();
				long currentSystemTimeMins = currentSystemTime/(60*1000);
				/*long totalTimeInMins =  AppUtility.getAppUtilityInstance().getAccumulatedPauseTime(currentServiceRunningTime.getStartTimeStamp(), AppUtility.getAppUtilityInstance().getCurrentTimeStampWithoutSecs());
				currentSystemTimeMins -= totalTimeInMins;*/
				
				Date mCurrentDate = new Date(currentSystemTimeMins*60*1000);
				final SimpleDateFormat formatterTime = new SimpleDateFormat(IAppConstants.HOUR_MINS_FORMAT);
				formatterTime.setTimeZone(TimeZone.getTimeZone(IAppConstants.UTC_TIMEZONE));
				newtime = formatterTime.format(mCurrentDate);
			}
			
			mTimeTrackerTextView.setText(newtime);
		}
	}