黄学彪
2020-01-17 4b378188ce972df432b23d9cb73babb6cc0679c6
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightMenuControl.cs
@@ -76,11 +76,16 @@
            //最大显示5个
            int rowCount = this.RowCount > 5 ? 5 : this.RowCount;
            if (rowCount < 5 && titleText != null)
            if (titleText != null)
            {
                //菜单+1
                rowCount++;
                //449宽度的时候,即使明细已经超过了5个,但是还是可以+1的,因为这个模式多了一张图片
                if (rowCount < 5 || i_widthType == 2)
                {
                    //菜单+1
                    rowCount++;
                }
            }
            //背景
            var frameBack = new FrameLayout();
            frameBack.X = Application.GetRealWidth(662 - (RowWidth - 395));
@@ -92,6 +97,7 @@
            var frameTable = new FrameLayout();
            frameTable.Y = Application.GetRealHeight(16);
            frameTable.Height = Application.GetRealHeight(RowHeight * rowCount);
            frameBack.AddChidren(frameTable);
            if (titleText != null)
@@ -105,18 +111,18 @@
            //列表控件
            this.listView = new VerticalListControl();
            listView.Height = frameTable.Height;
            if (rowCount == 5)
            {
                //连带标题,只能显示5行
                listView.Height = frameTable.Height - Application.GetRealHeight(RowHeight);
            }
            listView.Radius = (uint)Application.GetRealHeight(17);
            if (titleText != null)
            {
                //拥有标题
                listView.Y = Application.GetRealHeight(RowHeight);
                listView.Height = frameTable.Height - Application.GetRealHeight(RowHeight);
            }
            listView.Radius = (uint)Application.GetRealHeight(17);
            else
            {
                //没有标题
                listView.Height = frameTable.Height;
            }
            frameTable.AddChidren(listView);
        }
@@ -210,6 +216,7 @@
            if (btnText != null)
            {
                btnText.TextColor = select == true ? UserCenterColor.Current.TextColor1 : UserCenterColor.Current.TextGrayColor1;
                btnText.IsBold = select;
            }
            //前回选择的菜单为null,或者是相同的东西,则不处理
            if (this.oldRowFrame == null || this.oldRowFrame.MainKeys == frame.MainKeys)