public override void OnFocusChange(FlexibleView flexibleView, int previousFocus, int currentFocus) { FlexibleView.ViewHolder previousFocusView = flexibleView.FindViewHolderForAdapterPosition(previousFocus); if (previousFocusView != null) { //Console.WriteLine($"previousFocus {previousFocus.AdapterPosition}"); if (previousFocusView.AdapterPosition % 2 == 0) { previousFocusView.ItemView.BackgroundColor = Color.Cyan; } else { previousFocusView.ItemView.BackgroundColor = Color.Yellow; } //previousFocus.SizeWidth = 150; //previousFocus.SizeHeight = 60; //NotifyItemChanged(previousFocus.AdapterPosition); } FlexibleView.ViewHolder currentFocusView = flexibleView.FindViewHolderForAdapterPosition(currentFocus); if (currentFocusView != null) { //Console.WriteLine($"currentFocus {currentFocus.AdapterPosition}"); currentFocusView.ItemView.BackgroundColor = Color.Magenta; //currentFocus.SizeWidth = 200; //currentFocus.SizeHeight = 100; //NotifyItemChanged(currentFocus.AdapterPosition); } }
public override void OnFocusChange(FlexibleView flexibleView, int previousFocus, int currentFocus) { FlexibleViewViewHolder previousFocusView = flexibleView.FindViewHolderForAdapterPosition(previousFocus); if (previousFocusView != null) { if (previousFocusView.AdapterPosition % 2 == 0) { previousFocusView.ItemView.BackgroundColor = Color.Cyan; } else { previousFocusView.ItemView.BackgroundColor = Color.Yellow; } } FlexibleViewViewHolder currentFocusView = flexibleView.FindViewHolderForAdapterPosition(currentFocus); if (currentFocusView != null) { currentFocusView.ItemView.BackgroundColor = Color.Magenta; } }