0

I couldn't change ProgressBar color inside of BottomSheetDialogFragment and started testing it with BottomSheetDialog (not Fragment), and this is what happend:

  1. Color of ProgresBar stays default without using viewBinding for dialogs content view:

    bottomSheetDialog.setContentView(R.layout.bottom_sheet_search)

  2. Color is succesfully changed to required using viewBinding:

    val bottomSheetSearchBinding = BottomSheetSearchBinding.inflate(layoutInflater) bottomSheetDialog.setContentView(bottomSheetSearchBinding.root)

enter image description here

But with BottomSheetDialogFragment color doesn't changes even with viewBinding, it always stays default.

enter image description here

Before that Ii simply changed colorAccent color in styles and ProgressBar color was changing everywhere fine, but now I have some issues with that. I also tried to set style to that ProgressBar, but that didn't help either. For other views required color inside of BottomSheetDialogFragment works fine.

Am I doing something wrong or there are some other ways to change the color of Progressbar?

Couver
  • 29
  • 5

1 Answers1

0

android:indeterminateTint="color" solved the problem

Couver
  • 29
  • 5