title: Android progressBar not showing or invisible
body: <p>My custom progress bar doesn't show. I animate it in my activity and also use drawable resource file for it. Here is my code.</p>
  
  <p>Activity.java</p>
  
  <pre><code>  ProgressBar progressBar;
  
     @Override
     protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_home);
        progressBar =  findViewById(R.id.progressBar);
      ObjectAnimator animation = ObjectAnimator.ofInt(progressBar, "progress", 
     0, 500); 
      animation.setDuration(5000); // in milliseconds
      animation.setInterpolator(new DecelerateInterpolator());
      animation.start();
  </code></pre>
  
  <p>activity.xml</p>
  
  <pre><code>      &lt;ProgressBar
      android:id="@+id/progressBar"
      style="?android:attr/progressBarStyleHorizontal"
  
      android:layout_width="150dp"
      android:layout_height="150dp"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:max="500"
      android:progress="0"
      android:progressDrawable="@drawable/circular"
      app:layout_constraintBottom_toBottomOf="@+id/relativeLayout"
      app:layout_constraintEnd_toEndOf="@+id/relativeLayout"
      app:layout_constraintHorizontal_bias="0.475"
      app:layout_constraintStart_toStartOf="@+id/relativeLayout"
      app:layout_constraintTop_toTopOf="@+id/relativeLayout"
      app:layout_constraintVertical_bias="0.153" /&gt;
  </code></pre>
  
  <p>drawableResource.xml</p>
  
  <pre><code>     &lt;?xml version="1.0" encoding="utf-8"?&gt;
          &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
          android:useLevel="true"
          android:indeterminate="true"
          android:innerRadiusRatio="2.3"
          android:shape="ring"
          android:thickness="3.8sp" &gt;
          &lt;solid android:color="@color/colorPrimary" /&gt;
       &lt;/shape&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XlGka.png" rel="nofollow noreferrer">want this kind of progress bar</a></p>