public AndroidCipherCell(Context context, CipherViewCell cipherView, Typeface faTypeface, Typeface miTypeface) : base(context) { CipherViewCell = cipherView; _faTypeface = faTypeface; _miTypeface = miTypeface; var view = (context as Activity).LayoutInflater.Inflate(Resource.Layout.CipherViewCell, null); IconImage = view.FindViewById <IconImageView>(Resource.Id.CipherCellIconImage); Icon = view.FindViewById <TextView>(Resource.Id.CipherCellIcon); Name = view.FindViewById <TextView>(Resource.Id.CipherCellName); SubTitle = view.FindViewById <TextView>(Resource.Id.CipherCellSubTitle); SharedIcon = view.FindViewById <TextView>(Resource.Id.CipherCellSharedIcon); AttachmentsIcon = view.FindViewById <TextView>(Resource.Id.CipherCellAttachmentsIcon); MoreButton = view.FindViewById <Android.Widget.Button>(Resource.Id.CipherCellButton); MoreButton.Click += MoreButton_Click; Icon.Typeface = _faTypeface; SharedIcon.Typeface = _faTypeface; AttachmentsIcon.Typeface = _faTypeface; MoreButton.Typeface = _miTypeface; var small = (float)Device.GetNamedSize(NamedSize.Small, typeof(Label)); Icon.SetTextSize(ComplexUnitType.Sp, 22.0952380952381F); Name.SetTextSize(ComplexUnitType.Sp, (float)Device.GetNamedSize(NamedSize.Medium, typeof(Label))); SubTitle.SetTextSize(ComplexUnitType.Sp, small); SharedIcon.SetTextSize(ComplexUnitType.Sp, small); AttachmentsIcon.SetTextSize(ComplexUnitType.Sp, small); MoreButton.SetTextSize(ComplexUnitType.Sp, 25); AddView(view); }
public AndroidSendCell(Context context, SendViewCell sendView, Typeface faTypeface, Typeface miTypeface) : base(context) { SendViewCell = sendView; _faTypeface = faTypeface; _miTypeface = miTypeface; var view = (context as Activity).LayoutInflater.Inflate(Resource.Layout.SendViewCell, null); Icon = view.FindViewById <TextView>(Resource.Id.SendCellIcon); Name = view.FindViewById <TextView>(Resource.Id.SendCellName); SubTitle = view.FindViewById <TextView>(Resource.Id.SendCellSubTitle); DisabledIcon = view.FindViewById <TextView>(Resource.Id.SendCellDisabledIcon); HasPasswordIcon = view.FindViewById <TextView>(Resource.Id.SendCellHasPasswordIcon); MaxAccessCountReachedIcon = view.FindViewById <TextView>(Resource.Id.SendCellMaxAccessCountReachedIcon); ExpiredIcon = view.FindViewById <TextView>(Resource.Id.SendCellExpiredIcon); PendingDeleteIcon = view.FindViewById <TextView>(Resource.Id.SendCellPendingDeleteIcon); MoreButton = view.FindViewById <Button>(Resource.Id.SendCellButton); MoreButton.Click += MoreButton_Click; Icon.Typeface = _faTypeface; DisabledIcon.Typeface = _faTypeface; HasPasswordIcon.Typeface = _faTypeface; MaxAccessCountReachedIcon.Typeface = _faTypeface; ExpiredIcon.Typeface = _faTypeface; PendingDeleteIcon.Typeface = _faTypeface; MoreButton.Typeface = _miTypeface; var small = (float)Device.GetNamedSize(NamedSize.Small, typeof(Label)); Icon.SetTextSize(ComplexUnitType.Pt, 10); Name.SetTextSize(ComplexUnitType.Sp, (float)Device.GetNamedSize(NamedSize.Medium, typeof(Label))); SubTitle.SetTextSize(ComplexUnitType.Sp, small); DisabledIcon.SetTextSize(ComplexUnitType.Sp, small); HasPasswordIcon.SetTextSize(ComplexUnitType.Sp, small); MaxAccessCountReachedIcon.SetTextSize(ComplexUnitType.Sp, small); ExpiredIcon.SetTextSize(ComplexUnitType.Sp, small); PendingDeleteIcon.SetTextSize(ComplexUnitType.Sp, small); MoreButton.SetTextSize(ComplexUnitType.Sp, 25); if (!SendViewCell.ShowOptions) { MoreButton.Visibility = ViewStates.Gone; } AddView(view); }