title: How do I add process button to show downloading progress on button?
body: <p>My project is of downloading PDF and then viewing it. <a href="https://stackoverflow.com/a/24748227/8769785">https://stackoverflow.com/a/24748227/8769785</a></p>
  
  <p>I want to show the download progress on download button!["download" button downloads from URL provided and "view "button opens up the file]</p>
  
  <p><a href="https://i.stack.imgur.com/HRsYL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HRsYL.png" alt="enter image description here"></a></p>
  
  <p><a href="http://blog.rhesoft.com/2015/12/29/tutorial-android-process-button-animated-buttons-on-android-studio/" rel="nofollow noreferrer">http://blog.rhesoft.com/2015/12/29/tutorial-android-process-button-animated-buttons-on-android-studio/</a></p>
  
  <p>I want to add "Submit Process button" animation in the "Download button" when file is being downloaded(the progress). </p>
  
  <p>My problem is I don't know how to get the animation (the progress) on download button.</p>
  
  <p>In the project  there is a "Filedownloader "class 
  I've tried it with on click listener of the main activity but I still cannot get the progress on the button. I can't get progress from the URL.<br>
  I'm new to Android programming. </p>
  
  <p>The code is like this</p>
  
  <p>// get the button view
          SubmitProcessButton btnSubmit = (SubmitProcessButton) findViewById(R.id.btnSubmit);</p>
  
  <pre><code>    //start with progress = 0
      btnSubmit.setProgress(0);
  
      //to test the animations, when we touch the button it will start counting
      btnSubmit.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              SubmitProcessButton btn = (SubmitProcessButton) view;
              // we add 25 in the button progress each click
              if(btn.getProgress() &lt; 100){
                  btn.setProgress(btn.getProgress() + 25);
              }
          }
      });
  </code></pre>