예제 #1
0
        internal LayerLegendItemView(Context?context)
            : base(context)
        {
            Orientation      = Orientation.Horizontal;
            LayoutParameters = new LayoutParams(LayoutParams.WrapContent, LayoutParams.WrapContent);
            SetGravity(GravityFlags.Top);

            _symbolDisplay = new SymbolDisplay(context)
            {
                LayoutParameters = new LayoutParams(LayoutParams.WrapContent, LayoutParams.MatchParent),
            };
            _symbolDisplay.SetMaxHeight(40);
            _symbolDisplay.SetMaxWidth(40);
            AddView(_symbolDisplay);

            _textView = new TextView(context)
            {
                LayoutParameters = new LayoutParams(LayoutParams.WrapContent, LayoutParams.MatchParent),
            };
            _textView.Gravity = GravityFlags.CenterVertical;
            AddView(_textView);
            RequestLayout();
        }