ProgressBar setIndeterminate - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ProgressBar setIndeterminate method.

This code example shows how to use the following methods:setIndeterminate, setProgress, setSecondaryProgress, setVisibility
        if (mHorizontalProgress == null) {
            return; 
        } 
        switch (value) {
            case Window.PROGRESS_VISIBILITY_ON:
                mHorizontalProgress.setVisibility(View.VISIBLE);
                break; 
 
            case Window.PROGRESS_VISIBILITY_OFF:
                mHorizontalProgress.setVisibility(View.GONE);
                break; 
 
            case Window.PROGRESS_INDETERMINATE_ON:
                mHorizontalProgress.setIndeterminate(true);
                break; 
 
            case Window.PROGRESS_INDETERMINATE_OFF:
                mHorizontalProgress.setIndeterminate(false);
                break; 
 

9
CodeRank
This code example shows how to use the following methods:getProgress, getSecondaryProgress, setIndeterminate, setProgress, setSecondaryProgress
        assertEquals(20, progressBar.getSecondaryProgress());
    } 
 
    @Test 
    public void shouldNotSetProgressWhenIndeterminate() throws Exception { 
        progressBar.setIndeterminate(true);
        progressBar.setProgress(10);
        progressBar.setSecondaryProgress(20);
        progressBar.setIndeterminate(false);
 
        assertEquals(0, progressBar.getProgress());
        assertEquals(0, progressBar.getSecondaryProgress());
    } 
 
    @Test 
    public void testIncrementProgressBy() throws Exception { 
        assertEquals(0, progressBar.getProgress());
        progressBar.incrementProgressBy(1);
        assertEquals(1, progressBar.getProgress());
        progressBar.incrementProgressBy(1);
9
CodeRank
This code example shows how to use the following methods:setIndeterminate, setProgress, setSecondaryProgress, setVisibility
        if (mHorizontalProgress == null) {
            return; 
        } 
        switch (value) {
            case Window.PROGRESS_VISIBILITY_ON:
                mHorizontalProgress.setVisibility(View.VISIBLE);
                break; 
 
            case Window.PROGRESS_VISIBILITY_OFF:
                mHorizontalProgress.setVisibility(View.GONE);
                break; 
 
            case Window.PROGRESS_INDETERMINATE_ON:
                mHorizontalProgress.setIndeterminate(true);
                break; 
 
            case Window.PROGRESS_INDETERMINATE_OFF:
                mHorizontalProgress.setIndeterminate(false);
                break; 
 

9
CodeRank
This code example shows how to use the following methods:setId, setLayoutParams, setIndeterminate, setVisibility
This code example shows how to use the following methods:setId, setLayoutParams, setIndeterminate, setVisibility
This code example shows how to use the following methods:setLayoutParams, getIndeterminateDrawable, setIndeterminate
8
CodeRank
This code example shows how to use the following methods:setIndeterminate, setProgress, setVisibility
 
    @Override 
    public void onReset() { 
        // Reset Progress Bar 
        if (mHeaderProgressBar != null) {
            mHeaderProgressBar.setVisibility(View.GONE);
            mHeaderProgressBar.setProgress(0);
            mHeaderProgressBar.setIndeterminate(false);
        } 
 
        // Reset Text View 
        if (mHeaderTextView != null) {
            mHeaderTextView.setVisibility(View.VISIBLE);
            mHeaderTextView.setText(mPullRefreshLabel);
        } 
 
        // Reset the Content Layout 
        if (mContentLayout != null) {
            mContentLayout.setVisibility(View.VISIBLE);
        } 
8
CodeRank
This code example shows how to use the following methods:setIndeterminate, setProgress, setVisibility
 
	@Override 
	public void onReset() { 
		// Reset Progress Bar 
		if (mHeaderProgressBar != null) {
			mHeaderProgressBar.setVisibility(View.GONE);
			mHeaderProgressBar.setProgress(0);
			mHeaderProgressBar.setIndeterminate(false);
		} 
 
		// Reset Text View 
		if (mHeaderTextView != null) {
			mHeaderTextView.setVisibility(View.VISIBLE);
			mHeaderTextView.setText(mPullRefreshLabel);
		} 
 
		// Reset the Content Layout 
		if (mContentLayout != null) {
			mContentLayout.setVisibility(View.VISIBLE);
		} 
7
CodeRank
This code example shows how to use the following methods:setLayoutParams, setIndeterminate
This code example shows how to use the following methods:setIndeterminate, setProgress, setSecondaryProgress, setVisibility
		if (mHorizontalProgress == null) {
			return; 
		} 
		switch (value) {
			case Window.PROGRESS_VISIBILITY_ON:
				mHorizontalProgress.setVisibility(View.VISIBLE);
				break; 
			 
			case Window.PROGRESS_VISIBILITY_OFF:
				mHorizontalProgress.setVisibility(View.GONE);
				break; 
			 
			case Window.PROGRESS_INDETERMINATE_ON:
				mHorizontalProgress.setIndeterminate(true);
				break; 
			 
			case Window.PROGRESS_INDETERMINATE_OFF:
				mHorizontalProgress.setIndeterminate(false);
				break; 
			 

7
CodeRank

Related ProgressBar setIndeterminate Questions & Answers:

Other ProgressBar setIndeterminate Examples

22:	        progressBar.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
23:	                LayoutParams.WRAP_CONTENT, Gravity.CENTER));
24:	        progressBar.setIndeterminate(true);
25:	        getListView().setEmptyView(progressBar);
26:

Read More

setIndeterminate Method Overview
Change the indeterminate mode for this progress bar.
See Code Examples for other Android ProgressBar Methods: