UserDialogs custom UI in MVVMCross
Asked Answered
R

2

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);
}
Ritaritardando answered 30/6, 2016 at 19:58 Comment(0)
R
3

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

Rowlock answered 30/6, 2016 at 22:56 Comment(1)
any idea for the #49162912Ritaritardando
H
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

Halley answered 1/7, 2016 at 14:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.