0
Когда я запускаю этот код, imageView выравнивается вправо. Я пробовал добавлять гравитацию и т. Д., Но не добился успеха.ImageView выровнен с правой стороны родителя в Xamarin Android
Я хочу, чтобы изображение значка (imageView) отображалось слева, непосредственно перед текстом «Звук».
Любая идея? Большое спасибо.
protected override Android.Views.View GetCellCore(Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context)
{
var cell = (SwitchCellView)base.GetCellCore(item, convertView, parent, context);
cell.SetPadding(50, 0, 0, 0);
var imageView = new ImageView(context);
imageView.SetImageResource(Resource.Drawable.icon);
cell.AddView(imageView, 50, 50);
return cell;
}