Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Disclosure Button for Listview in Android

$
0
0

Hi,
I want to show disclosure accessory view for Listview in android(xamarin forms). I made it for iOS using custom renderer as below :

[assembly: ExportCell(typeof(ToDoItemCell), typeof(TaxComp.iOS.ToDoViewCellRenderer))]
namespace TaxComp.iOS
{
    public class ToDoViewCellRenderer:Xamarin.Forms.Platform.iOS.ViewCellRenderer
    {
        public override MonoTouch.UIKit.UITableViewCell GetCell (Cell item, MonoTouch.UIKit.UITableView tv)
        {
            var ToDoItemCell = (ToDoItemCell)item;
            var cell = base.GetCell (item, tv);
            if (cell != null) {
                cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
            }
            tv.SeparatorColor = UIColor.LightGray;
            tv.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
            return cell;
        } 
    }
}

I want same for android. How can we do it?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>