I'm trying to add Progressbar in my xml file. This progressbar will be shown as soon as user enters data in the three fields and clicks on "Submit" button and then new Activity will start.

Here's Logcat main error line

> 
> Unable to start activity ComponentInfo{com.example.hadithapp/com.example.hadithapp.AddHadithDetailActivity}: android.view.InflateException: Binary XML file line #99: Binary XML file line #99: Error inflating class android.widget.ProgressBar
> 
> 
> 

Here's the progressbar xml code

```
<ProgressBar
    android:id="@+id/interminate_progress_bar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:indeterminate="true"
    android:visibility="visible"
    android:theme="@style/ProgressBarTheme"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintBottom_toBottomOf="parent"/>

```

Here's the style xml code

```
<style name="ProgressBarTheme">
    <item name="android:backgroundTint">@drawable/progress_bar_bg</item>
    <item name="android:background">@drawable/progress_bar_bg</item>
</style>

```

Here's @drawable/progress\_bar\_bg code

```
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners android:radius="360dp"/>
<solid android:color="@color/colorPrimary"/>

</shape>

```

I didn't know what causes ERROR. But when I removed the theme line in my progress\_bar xml code, the ERROR removed.

Still I don't get why progressbar theme doesn't work.