If I switch between my different tabs, I allways get this little click animation that looks like a shadow or sth. I use a custom Renderer for my Shell, but how can I disable this animation?
Asked
Active
Viewed 290 times
0
-
Check your tags' descriptions -- the "shell" tag here is for _text-based interactive command interpreters_. As far as I can tell it has nothing to do with this question. – Charles Duffy Nov 17 '21 at 20:37
-
...as for the question, a [mre] showing the shortest possible code that reproduces the undesired behavior would be a good place to start. – Charles Duffy Nov 17 '21 at 20:37
-
Please provide enough code so others can better understand or reproduce the problem. – Community Nov 22 '21 at 14:08
1 Answers
0
I found the solution by myself. Here is my code:
public void ResetAppearance(BottomNavigationView bottomView)
{
}
public void SetAppearance(BottomNavigationView bottomView, IShellAppearanceElement appearance)
{
Android.Graphics.Color elevationBGColor = ((Color)Xamarin.Forms.Application.Current.Resources["ElevationBGColor"]).ToAndroid();
bottomView.LabelVisibilityMode = LabelVisibilityMode.LabelVisibilityUnlabeled;
bottomView.SetBackgroundColor(elevationBGColor);
int[][] Tintstates = new int[][]
{
new int[] {-Android.Resource.Attribute.StateChecked}, // unchecked
new int[] { Android.Resource.Attribute.StateChecked} // pressed
};
int[] Tintcolors = new int[]
{
Xamarin.Forms.Color.White.ToAndroid(),
((Color)Xamarin.Forms.Application.Current.Resources["PrimaryColor"]).ToAndroid()
};
ColorStateList TintList = new ColorStateList(Tintstates, Tintcolors)
bottomView.ItemIconTintList = TintList;
bottomView.ItemRippleColor = null;
}
In this code I also set a color change to the item i selected in my navbar, but the code i was searching for was
bottomView.ItemRippleColor = null;

Km0209
- 1
- 1