简体   繁体   中英

Set selected ListView TextColor in Xamarin.Forms Android

I want to set the selected Text Color of a ListViewItem to white in Xamarin Forms Android.

On iOS I can do it with custom ListViewRenderer and a custom UITableViewSource where I set the HighlightedTextColor.

cell.TextLabel.HighlightedTextColor = UIColor.FromRGB(255, 255, 255);

Is there an equivalent for this in Android? I already tried it with the Resource.Attribute ColorControlActivated , but it is not working.

//Android Color Class is in the root of the Resource Class         
     ListViewItem.TextColor = Android.Resource.Color.White;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM