List of usage examples for android.view Window PROGRESS_INDETERMINATE_OFF
int PROGRESS_INDETERMINATE_OFF
To view the source code for android.view Window PROGRESS_INDETERMINATE_OFF.
Click Source Link
From source file:android.support.v7.app.ActionBarActivityDelegateBase.java
@Override void setSupportProgressBarIndeterminate(boolean indeterminate) { updateProgressBars(indeterminate ? Window.PROGRESS_INDETERMINATE_ON : Window.PROGRESS_INDETERMINATE_OFF); }
From source file:android.support.v7.app.ActionBarActivityDelegateBase.java
/** * Progress Bar function. Mostly extracted from PhoneWindow.java *//* ww w .j a v a 2s . c o m*/ private void updateProgressBars(int value) { ProgressBar circularProgressBar = getCircularProgressBar(); ProgressBar horizontalProgressBar = getHorizontalProgressBar(); if (value == Window.PROGRESS_VISIBILITY_ON) { if (mFeatureProgress) { int level = horizontalProgressBar.getProgress(); int visibility = (horizontalProgressBar.isIndeterminate() || level < 10000) ? View.VISIBLE : View.INVISIBLE; horizontalProgressBar.setVisibility(visibility); } if (mFeatureIndeterminateProgress) { circularProgressBar.setVisibility(View.VISIBLE); } } else if (value == Window.PROGRESS_VISIBILITY_OFF) { if (mFeatureProgress) { horizontalProgressBar.setVisibility(View.GONE); } if (mFeatureIndeterminateProgress) { circularProgressBar.setVisibility(View.GONE); } } else if (value == Window.PROGRESS_INDETERMINATE_ON) { horizontalProgressBar.setIndeterminate(true); } else if (value == Window.PROGRESS_INDETERMINATE_OFF) { horizontalProgressBar.setIndeterminate(false); } else if (Window.PROGRESS_START <= value && value <= Window.PROGRESS_END) { // We want to set the progress value before testing for visibility // so that when the progress bar becomes visible again, it has the // correct level. horizontalProgressBar.setProgress(value - Window.PROGRESS_START); if (value < Window.PROGRESS_END) { showProgressBars(horizontalProgressBar, circularProgressBar); } else { hideProgressBars(horizontalProgressBar, circularProgressBar); } } }
From source file:com.actionbarsherlock.internal.ActionBarSherlockCompat.java
@Override public void setProgressBarIndeterminate(boolean indeterminate) { if (DEBUG)//from www.ja v a 2 s . c o m Log.d(TAG, "[setProgressBarIndeterminate] indeterminate: " + indeterminate); setFeatureInt(Window.FEATURE_PROGRESS, indeterminate ? Window.PROGRESS_INDETERMINATE_ON : Window.PROGRESS_INDETERMINATE_OFF); }
From source file:com.actionbarsherlock.internal.ActionBarSherlockCompat.java
private void updateProgressBars(int value) { IcsProgressBar circularProgressBar = getCircularProgressBar(true); IcsProgressBar horizontalProgressBar = getHorizontalProgressBar(true); final int features = mFeatures;//getLocalFeatures(); if (value == Window.PROGRESS_VISIBILITY_ON) { if ((features & (1 << Window.FEATURE_PROGRESS)) != 0) { int level = horizontalProgressBar.getProgress(); int visibility = (horizontalProgressBar.isIndeterminate() || level < 10000) ? View.VISIBLE : View.INVISIBLE; horizontalProgressBar.setVisibility(visibility); }/*from w ww. j av a2s . c om*/ if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0) { circularProgressBar.setVisibility(View.VISIBLE); } } else if (value == Window.PROGRESS_VISIBILITY_OFF) { if ((features & (1 << Window.FEATURE_PROGRESS)) != 0) { horizontalProgressBar.setVisibility(View.GONE); } if ((features & (1 << Window.FEATURE_INDETERMINATE_PROGRESS)) != 0) { circularProgressBar.setVisibility(View.GONE); } } else if (value == Window.PROGRESS_INDETERMINATE_ON) { horizontalProgressBar.setIndeterminate(true); } else if (value == Window.PROGRESS_INDETERMINATE_OFF) { horizontalProgressBar.setIndeterminate(false); } else if (Window.PROGRESS_START <= value && value <= Window.PROGRESS_END) { // We want to set the progress value before testing for visibility // so that when the progress bar becomes visible again, it has the // correct level. horizontalProgressBar.setProgress(value - Window.PROGRESS_START); if (value < Window.PROGRESS_END) { showProgressBars(horizontalProgressBar, circularProgressBar); } else { hideProgressBars(horizontalProgressBar, circularProgressBar); } } else if (Window.PROGRESS_SECONDARY_START <= value && value <= Window.PROGRESS_SECONDARY_END) { horizontalProgressBar.setSecondaryProgress(value - Window.PROGRESS_SECONDARY_START); showProgressBars(horizontalProgressBar, circularProgressBar); } }
From source file:lewa.support.v7.app.ActionBarActivityDelegateBase.java
/** * Progress Bar function. Mostly extracted from PhoneWindow.java *//* www .j av a 2s .c o m*/ private void updateProgressBars(int value) { ProgressBarICS circularProgressBar = getCircularProgressBar(); ProgressBarICS horizontalProgressBar = getHorizontalProgressBar(); if (value == Window.PROGRESS_VISIBILITY_ON) { if (mFeatureProgress) { int level = horizontalProgressBar.getProgress(); int visibility = (horizontalProgressBar.isIndeterminate() || level < 10000) ? View.VISIBLE : View.INVISIBLE; horizontalProgressBar.setVisibility(visibility); } if (mFeatureIndeterminateProgress) { circularProgressBar.setVisibility(View.VISIBLE); } } else if (value == Window.PROGRESS_VISIBILITY_OFF) { if (mFeatureProgress) { horizontalProgressBar.setVisibility(View.GONE); } if (mFeatureIndeterminateProgress) { circularProgressBar.setVisibility(View.GONE); } } else if (value == Window.PROGRESS_INDETERMINATE_ON) { horizontalProgressBar.setIndeterminate(true); } else if (value == Window.PROGRESS_INDETERMINATE_OFF) { horizontalProgressBar.setIndeterminate(false); } else if (Window.PROGRESS_START <= value && value <= Window.PROGRESS_END) { // We want to set the progress value before testing for visibility // so that when the progress bar becomes visible again, it has the // correct level. horizontalProgressBar.setProgress(value - Window.PROGRESS_START); if (value < Window.PROGRESS_END) { showProgressBars(horizontalProgressBar, circularProgressBar); } else { hideProgressBars(horizontalProgressBar, circularProgressBar); } } }
From source file:android.app.Activity.java
/** * Sets whether the horizontal progress bar in the title should be indeterminate (the circular * is always indeterminate)./*from w w w .ja v a 2s . c o m*/ * <p> * In order for the progress bar to be shown, the feature must be requested * via {@link #requestWindowFeature(int)}. * * @param indeterminate Whether the horizontal progress bar should be indeterminate. */ public final void setProgressBarIndeterminate(boolean indeterminate) { getWindow().setFeatureInt(Window.FEATURE_PROGRESS, indeterminate ? Window.PROGRESS_INDETERMINATE_ON : Window.PROGRESS_INDETERMINATE_OFF); }