Code example for ClipDrawable

0
	    //ShapeDrawable pgDrawable = new ShapeDrawable(new RectShape()); 
	    // Sets the progressBar color 
	    pgDrawable.getPaint().setColor(Color.parseColor(color));
 
	    // Adds the drawable to your progressBar 
	    ClipDrawable progress = new ClipDrawable(pgDrawable, Gravity.LEFT, ClipDrawable.HORIZONTAL);
	    m_progress.setProgressDrawable(progress);
	    m_progress.setBackgroundColor(Color.GRAY);
    } 
     
    public void updateProgress(int val) {
    	m_progress.setProgress(val);
    		 
    } 
     
    public void updateResult(String output) {
    	task_running = false;
    	m_textResult.setText(output);
    } 
     
Connect your IDE to all the code out there  Get Codota for Java