1

I want to disable the loading animation shown on an Android native ViewCell when the user long presses it. I was able to disable the highlighting of the ViewCell on click by implementing the following on resources/values/styles.xml

<style name="Maui.MainTheme" parent="Theme.MaterialComponents.DayNight">
    <item name="android:colorActivatedHighlight">@android:color/transparent</item>
    <item name="android:colorLongPressedHighlight">@android:color/transparent</item>
    <item name="android:colorActivatedHighlight">@android:color/transparent</item>
</style>

and including in my MainActivity like this

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]

However, I am unable to remove the loading animation. I came across this post with a similar question but potential solutions have not been provided.

1 Answer 1

2

You can modify colorControlHighlight:

<resources>
   <style name="Maui.MainTheme" parent="Theme.MaterialComponents.DayNight">
       <item name="android:colorActivatedHighlight">@android:color/transparent</item>
       <!--Add this code-->
       <item name="android:colorControlHighlight">@android:color/transparent</item>
   </style>
</resources>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.