title: Android ProgressBar does not work unless the progress value and max value are the same
body: <p>The xml code:</p>
  <pre><code>&lt;ProgressBar
      android:id=&quot;@+id/meditationProgressBar&quot;
      style=&quot;?android:attr/progressBarStyleHorizontal&quot;
      android:layout_width=&quot;100dp&quot;
      android:layout_height=&quot;100dp&quot;
      android:layout_gravity=&quot;center&quot;
      android:background=&quot;@drawable/circular_progress_gray&quot;
      android:indeterminate=&quot;false&quot;
      android:max=&quot;3660&quot;
      android:progress=&quot;100&quot;
      android:progressDrawable=&quot;@drawable/circular_progress_bar&quot;
      android:rotation=&quot;-90&quot; /&gt;
  </code></pre>
  <p>I set android:max=&quot;3660&quot; because that's the maximum value the progressbar will ever have.</p>
  <p>Kotlin Code:</p>
  <pre><code>override fun onTick(millisUntilFinished: Long) {
              meditationProgress++
              meditationProgressBar.progress=meditationTimeInSeconds-meditationProgress
              
          }
  </code></pre>
  <p>Variables:</p>
  <pre><code>private var meditationProgress = 0
  private var meditationTimeInSeconds:Int = meditationTime*60
  </code></pre>
  <p>I actually tried replacing &quot;meditationTimeInSeconds&quot; by &quot;30&quot; in the onTick function and I changed the android:max of the ProgressBar to 30 and the progress bar actually worked but I have no idea why it isn't working now.</p>
  <p>Edit 1:</p>
  <pre><code>private var meditationTimeInMilliSeconds = meditationTime*60000
  
   meditateTimer=object: CountDownTimer(meditationTimeInMilliSeconds.toLong(),1000){
  
          override fun onTick(millisUntilFinished: Long) {
              meditationProgress++
              meditationProgressBar.progress=meditationTimeInSeconds-meditationProgress
              meditationTvTimer.text=(meditationTimeInSeconds-meditationProgress).toString()
          }
  </code></pre>
  <p>I actually tried not using the drawable i am using for the progressbar and it still doesn't work. Anyways, here's the code for it.</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;layer-list xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;item&gt;
          &lt;shape android:shape=&quot;ring&quot;
              android:innerRadiusRatio=&quot;2.7&quot;
              android:thicknessRatio=&quot;50&quot;
              android:useLevel=&quot;true&quot;&gt;
              &lt;solid android:color=&quot;@color/black&quot;/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  <p>It's still the same. The progressbar doesn't work unless the progress value and the android:max value of the progressbar are the same</p>