@@ -26,10 +26,12 @@ private void ApplySwitchStyling(SwitchCompat switchCompat)
2626 var primaryColor = global ::Android . Graphics . Color . Argb ( 255 , 72 , 61 , 139 ) ;
2727
2828 // Gray color for knob when off and track
29- var grayColor = global ::Android . Graphics . Color . Argb ( 255 , 158 , 158 , 158 ) ; // Medium gray
29+ // Medium gray
30+ var grayColor = global ::Android . Graphics . Color . Argb ( 255 , 158 , 158 , 158 ) ;
3031
3132 // Create a more visible version for the track when on (60% opacity for better visibility)
32- var trackOnColor = global ::Android . Graphics . Color . Argb ( 153 , 72 , 61 , 139 ) ; // Primary color with 60% opacity
33+ // Primary color with 60% opacity
34+ var trackOnColor = global ::Android . Graphics . Color . Argb ( 153 , 72 , 61 , 139 ) ;
3335
3436 // Create color state lists for smooth transitions
3537 // StateChecked = 16842914 (from Android.Resource.Attribute.StateChecked)
@@ -68,7 +70,8 @@ private void ApplySwitchStyling(SwitchCompat switchCompat)
6870 // Create a new drawable without stroke/border
6971 var gradientDrawable = new global ::Android . Graphics . Drawables . GradientDrawable ( ) ;
7072 gradientDrawable . SetShape ( global ::Android . Graphics . Drawables . ShapeType . Rectangle ) ;
71- gradientDrawable . SetCornerRadius ( switchCompat . Context . Resources . DisplayMetrics . Density * 12 ) ; // Rounded corners
73+ // Rounded corners
74+ gradientDrawable . SetCornerRadius ( switchCompat . Context . Resources . DisplayMetrics . Density * 12 ) ;
7275 gradientDrawable . SetColor ( global ::Android . Graphics . Color . Transparent ) ;
7376 switchCompat . TrackDrawable = gradientDrawable ;
7477 }
0 commit comments