Exemplo n.º 1
0
        protected override View GetCellCore (Cell item, View convertView, ViewGroup parent, Context context)
        {
            var cell = (LinearLayout)base.GetCellCore (item, convertView, parent, context);
            cell.SetPadding(20, 10, 0, 10);
            cell.DividerPadding = 50;

            var div = new ShapeDrawable();
            div.SetIntrinsicHeight(1);

            div.Paint.Set(new Paint { Color = MobileCRM.Shared.Helpers.AppColors.SEPARATOR.ToAndroid() });


            if (parent is ListView) {
                ((ListView)parent).Divider = div;
                ((ListView)parent).DividerHeight = 1;
            }


            var label = (TextView)((LinearLayout)cell.GetChildAt(1)).GetChildAt(0);


            label.SetTextColor(MobileCRM.Shared.Helpers.AppColors.LABELWHITE.ToAndroid());

            
            label.TextSize = Font.SystemFontOfSize(NamedSize.Large).ToScaledPixel();

            var secondaryLabel = (TextView)((LinearLayout)cell.GetChildAt(1)).GetChildAt(1);

            secondaryLabel.SetTextColor(MobileCRM.Shared.Helpers.AppColors.LABELBLUE.ToAndroid());
           
            secondaryLabel.TextSize = Font.SystemFontOfSize(NamedSize.Medium).ToScaledPixel();


            return cell;
        }
		protected override View GetCellCore (Cell item, View convertView, ViewGroup parent, Context context)
		{
			var cell = (LinearLayout)base.GetCellCore (item, convertView, parent, context);
			cell.SetPadding(20, 10, 0, 10);
			cell.DividerPadding = 50;

			var div = new ShapeDrawable();
			div.SetIntrinsicHeight(1);
			//div.Paint.Set(new Paint { Color = Color.FromHex("00FFFFFF").ToAndroid() });

			if (parent is ListView) {
				((ListView)parent).Divider = div;
				((ListView)parent).DividerHeight = 1;
			}


			var label = (TextView)((LinearLayout)cell.GetChildAt(1)).GetChildAt(0);
			label.SetTextColor(Color.FromHex("000000").ToAndroid());
			label.TextSize = Font.SystemFontOfSize(NamedSize.Large).ToScaledPixel();

			var secondaryLabel = (TextView)((LinearLayout)cell.GetChildAt(1)).GetChildAt(1);
			secondaryLabel.SetTextColor(Color.FromHex("738182").ToAndroid());
			secondaryLabel.TextSize = Font.SystemFontOfSize(NamedSize.Medium).ToScaledPixel();


			return cell;
		}
		protected override View GetCellCore (Cell item, View convertView, ViewGroup parent, Context context)
		{
			var cell = (LinearLayout)base.GetCellCore(item, convertView, parent, context);
			cell.SetPadding(20, 30, 0, 30);
			cell.DividerPadding = 50;

			var div = new ShapeDrawable();
			div.SetIntrinsicHeight(1);
			div.Paint.Set(new Paint { Color = Color.FromHex("00FFFFFF").ToAndroid() });

			if (parent is ListView)
			{
				((ListView)parent).Divider = div;
				((ListView)parent).DividerHeight = 1;
			}

			var image = (ImageView)cell.GetChildAt(0);
			image.SetScaleType(ImageView.ScaleType.FitCenter);

			image.LayoutParameters.Width = 60;
			image.LayoutParameters.Height = 60;

			var linear = (LinearLayout)cell.GetChildAt(1);
			linear.SetGravity(GravityFlags.CenterVertical);

			var label = (TextView)linear.GetChildAt(0);
			label.SetTextColor(Color.White.ToAndroid());
			label.TextSize = Font.SystemFontOfSize(NamedSize.Medium).ToScaledPixel() * 1.25f;
			label.Gravity = (GravityFlags.CenterVertical);
			label.SetTextColor(Color.FromHex("FFFFFF").ToAndroid());
			var secondaryLabel = (TextView)linear.GetChildAt(1);
			secondaryLabel.Visibility = ViewStates.Gone;

			return cell;
		}