C# 如何禁用ripple effect选项卡Xamarin?

C# 如何禁用ripple effect选项卡Xamarin?,c#,xamarin,xamarin.android,C#,Xamarin,Xamarin.android,我有一个标签条,按下按钮,就会产生涟漪效应。 我想完全禁用这个效果 我需要一个android自定义渲染器 我找到了解决办法 在自定义渲染器中: protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e) { base.OnElementChanged(e); if (e.NewElement != null) {

我有一个标签条,按下按钮,就会产生涟漪效应。 我想完全禁用这个效果

我需要一个android自定义渲染器

我找到了解决办法

在自定义渲染器中:

    protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e)
    {
        base.OnElementChanged(e);

        if (e.NewElement != null)
        {
            _bottomNavigationView = (GetChildAt(0) as Android.Widget.RelativeLayout).GetChildAt(1) as BottomNavigationView;

            ViewGroup vg = (ViewGroup)_bottomNavigationView.GetChildAt(0);
            int tabsCount = vg.ChildCount;
            for (int j = 0; j < tabsCount; j++)
            {
                ViewGroup vgTab = (ViewGroup)vg.GetChildAt(j);
                vgTab.SetBackgroundResource(App1.Droid.Resource.Drawable.hideRipple);
            }
        }
    }
protected override void OnElementChanged(ElementChangedEventArgs e)
{
基础。一个要素发生变化(e);
if(例如NewElement!=null)
{
_bottomNavigationView=(GetChildAt(0)作为Android.Widget.RelativeLayout)。GetChildAt(1)作为bottomNavigationView;
ViewGroup vg=(ViewGroup)\u bottomNavigationView.GetChildAt(0);
int tabscont=vg.ChildCount;
对于(int j=0;j
在drawable/hideriple.xml中

<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
  <color android:startColor="@android:color/transparent"/>
</shape>


这只是Galaxy上的问题吗?@Prateek通常在android上。可能有自定义渲染器可以解决这一问题,您也可以在此@Prateek中检查解决方案谢谢,我意识到我需要使用自定义渲染器,但我不知道要禁用该效果需要应用哪个属性。我相信您会想添加,并尝试添加Github问题中提到的一些代码请记住将您的回复标记为答案,这可能对其他社区成员有所帮助,谢谢。