Forked from jessejiang0214/CustomAllViewCellRendereriOS.cs
Created
June 24, 2016 13:16
-
-
Save dkudelko/b8c120ba0cd7e7db93e413ca72591c87 to your computer and use it in GitHub Desktop.
Disable Xamarin Forms ListView select item HightLight color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
[assembly: ExportRenderer (typeof(ViewCell), typeof(MyAPP.iOS.CustomAllViewCellRendereriOS))] | |
namespace MyAPP.iOS | |
{ | |
public class CustomAllViewCellRendereriOS : ViewCellRenderer | |
{ | |
public override UIKit.UITableViewCell GetCell (Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) | |
{ | |
var cell = base.GetCell (item, reusableCell, tv); | |
if (cell != null) | |
cell.SelectionStyle = UIKit.UITableViewCellSelectionStyle.None; | |
return cell; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<resources> | |
<style name="CustomTheme" parent="android:Theme.Holo.Light"> | |
<item name="android:colorActivatedHighlight">@android:color/transparent</item> | |
</style> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment