Created
April 27, 2016 02:09
-
-
Save ionixjunior/572365a1b780848e59688eb07c3cbc04 to your computer and use it in GitHub Desktop.
This file contains 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.Platform.Android; | |
using Xamarin.Forms; | |
using Core.Droid.Renders; | |
using Core.Controls; | |
using Android.Widget; | |
[assembly: ExportRenderer (typeof (CustomImageCell), typeof (CustomImageCellRenderer))] | |
namespace Core.Droid.Renders | |
{ | |
public class CustomImageCellRenderer : ImageCellRenderer | |
{ | |
protected override Android.Views.View GetCellCore (Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context) | |
{ | |
LinearLayout cell = (LinearLayout)base.GetCellCore (item, convertView, parent, context); | |
ImageView image = (ImageView)cell.GetChildAt (0); | |
image.SetScaleType (ImageView.ScaleType.Center); | |
return cell; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment