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
  • 15,701
  • 19
  • 102
  • 197

2 Answers2

2

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

Rafael
  • 796
  • 7
  • 20
Sven-Michael Stübe
  • 14,384
  • 4
  • 49
  • 99
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,430
  • 2
  • 32
  • 49