ProgressBar isIndeterminate - 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 isIndeterminate method.

This code example shows how to use the following methods:isIndeterminate, setIndeterminate
        } 
    } 
 
    @Test 
    public void testIsDeterminate() throws Exception { 
        assertFalse(progressBar.isIndeterminate());
        progressBar.setIndeterminate(true);
        assertTrue(progressBar.isIndeterminate());
    } 
 
    @Test 
    public void shouldReturnZeroAsProgressWhenIndeterminate() throws Exception { 
        progressBar.setProgress(10);
        progressBar.setSecondaryProgress(20);
        progressBar.setIndeterminate(true);
        assertEquals(0, progressBar.getProgress());
        assertEquals(0, progressBar.getSecondaryProgress());
        progressBar.setIndeterminate(false);
 
        assertEquals(10, progressBar.getProgress());
7
CodeRank
This code example shows how to use the following methods:getContext, isIndeterminate, setIndeterminate, setProgress
	} 
 
	@Override 
	public Context getContext() {
		if (mProgress != null) {
			return mProgress.getContext();
		} 
		return null; 
	} 
 
	@Override 
	public boolean isAvailable() { 
		if (null == mProgress) {
			Log.e(TAG, "R.id.progress_bar is missing");
			return false; 
		} 
		return true; 
	} 
 
	public static int calProgressBySize(int total, int maxSize, List<?> list) {

6
CodeRank
This code example shows how to use the following methods:getContext, isIndeterminate, setIndeterminate, setProgress
	} 
 
	@Override 
	public Context getContext() {
		if (mProgress != null) {
			return mProgress.getContext();
		} 
		//if (mLoadingProgress != null) { 
		//	return mLoadingProgress.getContext(); 
		//} 
		return null; 
	} 
 
	@Override 
	public boolean isAvailable() { 
		if (null == mProgress) {
			Log.e(TAG, "R.id.progress_bar is missing");
			return false; 
		} 
		//if (null == mLoadingProgress) { 

6
CodeRank
This code example shows how to use the following methods:isIndeterminate, setIndeterminate, setProgress
     * /!\ must be called in UI thread 
     * 
     * @param progress 
     */ 
    public void setProgress(int progress) {
        if (mProgressBar.isIndeterminate())
            mProgressBar.setIndeterminate(false);
        mProgressBar.setProgress(progress);
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:isIndeterminate
        } 
    } 
 
    public boolean isIndeterminate() { 
        if (mProgress != null) {
            return mProgress.isIndeterminate();
        } 
        return mIndeterminate;
    } 
     
    @Override 
    public void setMessage(CharSequence message) {
        if (mProgress != null) {
            if (mProgressStyle == STYLE_HORIZONTAL) {
                super.setMessage(message);
            } else { 
                mMessageView.setText(message);
            } 
        } else { 
            mMessage = message;
5
CodeRank
This code example shows how to use the following methods:isIndeterminate
        } 
    } 
 
    public boolean isIndeterminate() { 
        if (mProgress != null) {
            return mProgress.isIndeterminate();
        } 
        return mIndeterminate;
    } 
 
    public void setMessage(CharSequence message) {
        if (mProgress != null) {
            if (mProgressStyle == STYLE_HORIZONTAL) {
                // mMessageView.setText(message); 
            } else if (mProgressStyle == STYLE_HORIZONTAL_BUTTON) {
 
            } else if (mProgressStyle == STYLE_DEFAULT) {
                mMessageView.setText(message);
 
            } else if (mProgressStyle == STYLE_BUTTON) {
3
CodeRank
This code example shows how to use the following methods:isIndeterminate
        } 
    } 
 
    public boolean isIndeterminate() { 
        if (mProgress != null) {
            return mProgress.isIndeterminate();
        } 
        return mIndeterminate;
    } 
 
    @Override 
    public void setMessage(CharSequence message) {
        if (mProgress != null) {
            if (mProgressStyle == STYLE_HORIZONTAL) {
                super.setMessage(message);
            } else { 
                mMessageView.setText(message);
            } 
        } else { 
            mMessage = message;
3
CodeRank
This code example shows how to use the following methods:isIndeterminate
        } 
    } 
 
    public boolean isIndeterminate() { 
        if (mProgress != null) {
            return mProgress.isIndeterminate();
        } 
        return mIndeterminate;
    } 
 
    @Override 
    public void setMessage(CharSequence message) {
        if (mProgress != null) {
                super.setMessage(message);
        } else { 
            mMessage = message;
        } 
    } 
 
    /** 
4
CodeRank
This code example shows how to use the following methods:isIndeterminate
        } 
    } 
 
    public boolean isIndeterminate() { 
        if (mProgress != null) {
            return mProgress.isIndeterminate();
        } 
        return mIndeterminate;
    } 
     
    public void setMessage(CharSequence message) {
        if (mProgress != null) {
            if (mProgressStyle == STYLE_HORIZONTAL) {
               // super.setMessage(message); 
            	mMessageView.setText(message);
            } else { 
                mMessageView.setText(message);
            } 
        } else { 
            mMessage = message;
4
CodeRank
This code example shows how to use the following methods:isIndeterminate
        } 
    } 
 
    public boolean isIndeterminate() { 
        if (mProgress != null) {
            return mProgress.isIndeterminate();
        } 
        return mIndeterminate;
    } 
 
    @Override 
    public void setMessage(CharSequence message) {
        if (mProgress != null) {
                super.setMessage(message);
        } else { 
            mMessage = message;
        } 
    } 
 
    /** 
3
CodeRank
isIndeterminate Method Overview
Indicate whether this progress bar is in indeterminate mode.
See Code Examples for other Android ProgressBar Methods: