Ejemplo n.º 1
0
        public static nfloat H(TimelineItemViewModel viewModel, nfloat width)
        {
            var    textAreaW = TextAreaW(width);
            nfloat h         = 0f;

            h += L.PaddingL;
            h += TimelineItemHeader.H.PlusHalfPadding();
            h += TimelineItemStatus.H(viewModel.Status, textAreaW).PlusHalfPadding();
            h += TimelineItemImages.H(textAreaW).PlusHalfPadding();
            h += TimelineItemButtons.H.PlusPadding();
            return(h);
        }
Ejemplo n.º 2
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();
            userIcon.Frame = new CGRect(L.PaddingL, L.PaddingL, L.UserIcon.Width, L.UserIcon.Height);
            var textAreaX = userIcon.MaxX().PlusHalfPadding();
            var textAreaW = TextAreaW(this.Width());

            header.Frame  = new CGRect(textAreaX, userIcon.MinY(), textAreaW, TimelineItemHeader.H);
            status.Frame  = new CGRect(textAreaX, header.MaxY().PlusHalfPadding(), textAreaW, status.H(textAreaW));
            images.Frame  = new CGRect(textAreaX, status.MaxY().PlusHalfPadding(), textAreaW, TimelineItemImages.H(textAreaW));
            buttons.Frame = new CGRect(textAreaX, images.MaxY().PlusHalfPadding(), textAreaW, L.Icon.Height);

            // fixme
            header.BackgroundColor  = UIColor.Orange;
            buttons.BackgroundColor = UIColor.Orange;
        }