Exemplo n.º 1
0
 public void UpdateColors(Color textColor, Color mutedColor,
                          Color iconDisabledColor)
 {
     Name.SetTextColor(textColor);
     SubTitle.SetTextColor(mutedColor);
     Icon.SetTextColor(mutedColor);
     HasPasswordIcon.SetTextColor(mutedColor);
     MaxAccessCountReachedIcon.SetTextColor(mutedColor);
     ExpiredIcon.SetTextColor(mutedColor);
     PendingDeleteIcon.SetTextColor(mutedColor);
     MoreButton.SetTextColor(iconDisabledColor);
 }
Exemplo n.º 2
0
        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);
        }