6

I am using UserDialogs library in my MVVMCross project. The following code has been tested and works perfectly fine, I could able to see Loading Dialog. The issue that I have, how could I able to change the color of the circular loading progress in order to match with my theme?

private async Testing ()
{
   using (Mvx.Resolve<IUserDialogs>().Loading("Loading..."))
   {
     await PutTaskDelay();
   }
}

async Task PutTaskDelay()
{
     await Task.Delay(2000);
}
casillas
  • 16,351
  • 19
  • 115
  • 215

2 Answers2

3

In your native code (iOS/Android) you have to

Rafael
  • 1,281
  • 2
  • 10
  • 35
Sven-Michael Stübe
  • 14,560
  • 4
  • 52
  • 103
2

You can supply AppCompat dialog themes using styles.xml:

<style name="Base.Theme.App" parent="Theme.AppCompat.DayNight.NoActionBar">
    ...
    <item name="dialogTheme">@style/Base.Theme.Dialog.App</item>
    <item name="alertDialogTheme">@style/Base.Theme.AlertDialog.App</item>
</style>

<style name="Base.Theme.Dialog.App" parent="Theme.AppCompat.DayNight.Dialog">
  <item name="colorAccent">@color/accent</item>
</style>

<style name="Base.Theme.AlertDialog.App" parent="Theme.AppCompat.DayNight.Dialog.Alert">
  <item name="colorAccent">@color/accent</item>
</style>

This will change the color of the progress widget in the ACR.UserDialogs library, along with the negative/positive/neutral action buttons. See more information here: How to Use and Style the new AlertDialog from appCompat 22.1 and above

Community
  • 1
  • 1
Trevor Balcom
  • 3,766
  • 2
  • 32
  • 51