-
Notifications
You must be signed in to change notification settings - Fork 471
[Bug] [MauiCompat] TouchEffect not working #1905
Comments
I ended up pulling in the source code for the Touch Effect manually into my MAUI project fix some of the errors on compile, and it seems to work fine after doing that also you need to make sure you have
in your MauiProgram.cs |
@LennoxP90 Looks good. Would you be willing to share the platform implementations in a gist? I find myself struggling with mapping the new namespaces.. |
@jonakirke94 It is a lot of files so i just created a repository |
@LennoxP90 Awesome, great work! Will use this workaround until it works as intended in the community toolkit 🎉 |
@LennoxP90 thank you for sharing your workaround! |
Created this repo based on Xamarin CommunityToolkit for Maui |
Any chance this will be implemented for Windows also? |
When it is implemented in MAUICommunityToolkit, I am not the owner of the code I just repackaged it into a MAUI compatible repository |
@LennoxP90 Any chance if you could share a sample with your workaround? I was able to pull the TouchEffect source code into my project but can't seem to trigger my press and long press commands. 😢 |
Its not perfect and is also a workaround (only for android, i dont own apple devices), but here is an quick rippleeffect implementation and clickable Stacklayout. Still getting used to maui and such... @jenyangk hope it helps you https://gist.github.com/DarkIrata/3918afe7af8ad4731a2747863ac3c15a |
To those with this issue, please try out StatefulContentView from UraniumUI. Disclosure: I made a pull request to get the control working for my use case but this UI kit is something I recommend for .NET MAUI. |
@adiamante if its the pressed side of thing your looking for could also give my control a go - https://github.com/IeuanWalker/Maui.StateButton |
@jonakirke94 instead of using the round corners effect look at updating to the new border control and setting the stroke shape property https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/border?view=net-maui-7.0#create-a-border The control i linked above is based on the border control so you have the pressed state + you can set the stroke shape of the button |
Hey @jfversluis, that Bug still exists afer 10 month since it was reported by @jonakirke94 . Well done! |
MauiCompat was something intended to get developers migrated from Xamarin Forms but it sadly didn't go as smoothly as we had hoped. There is some great work by Kym to add in the Touch Effect on the .NET MAUI Community Toolkit so I am going to close this as I doubt it will get fixed. That said @ericbrunner if you don't have anything constructive to say please don't bother. This is a toolkit built by and for the community with every members free time. Comments like yours really don't help. |
@bijington Be kind! I dont bother someone. It was a promise to all Xamarin.Forms devs to have a smooth migration over to MAUI. Keep that promise! |
@ericbrunner not sure if we, as a Toolkit team, did that promise.
This is an OSS project, feel free to submit a PR fixing the issue. We will be more than help to merge and/or help you to make the PR be green ˆˆ |
Hey @pictos, when OSS like
Obviously you can`t rely on what is described in official microsoft docs! From a developer perspective I expect that microsoft supports and sponsors Xamarin.CommunityToolkit and CommunityToolkit.Maui. Regarding your offer to fix the not working TouchEffect. I haven't the time and buy for 40 bucks a [Mr.Gestures] (https://www.mrgestures.com/) lifetime license, but it seems that the job is already done by @jonakirke94 #1905 (comment) |
Did anyone get Android's Ripple animation to work using I fiddled around in the code of For iOS it didn't work either, however I was able to fix it by using
All other features, e.g. Pressed state, seem to work correctly... Version: Maui 8.0.0-preview.6.8686/8.0.100. |
Hi,
I am struggling to get the TouchEffect to work in a brand new Maui project.
Description
I have created a brand new project and installed the following two nuget packages:
Xamarin.CommunityToolkit.MauiCompat 2.0.2-preview1013
CommunityToolkit.Maui 1.2.0
The app compiles fine and everything else appear to work as intended
I have confirmed that other effects such as
xct:CornerRadiusEffect
works in my repro so I believe I am importing the correct namespaces.Just the touch effects seem to do nothing.
In my reproduction I followed the tutorial on https://www.youtube.com/watch?v=2QKFsI7zcts
I have added the effects and compatibility renderers in my
MauiProgra.cs
Stack Trace
Link to Reproduction Sample
(https://github.com/jonakirke94/MauiTouchEffectRepro)
Steps to Reproduce
Expected Behavior
The TouchEffects works as in Xamarin
Actual Behavior
Usings of the TouchEffects do nothing
Basic Information
maui-android 6.0.486/6.0.400
Workaround
I haven't been able to find a workaround
Reproduction imagery
The text was updated successfully, but these errors were encountered: