mac
2024-07-25 3f6685c77beeb12baf840733fb890860f4c26e7c
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs
@@ -26,13 +26,26 @@
        /// <param name="isClick">false点击无效</param>
        public bool GetClick()
        {
           return this.mIsClick;
            return this.mIsClick;
        }
        /// <summary>
        /// 延时时间ms
        /// </summary>
        private const int millisecondsTimeout = 100;
        public const int millisecondsTimeout = 100;
        /// <summary>
        /// 选中颜色
        /// </summary>
        public const uint seleBackgroundColor = 0xFFF2F3F7;
        /// <summary>
        /// 不支持按键文本颜色
        /// </summary>
        public const uint unBackgroundColor = 0xFFA3AAB7;
        /// <summary>
        /// 不支持整个颜色
        /// </summary>
        public const uint unParentBackgroundColor = 0xFFF2F3F7;
        /// <summary>
        /// 调整真实高度
@@ -75,24 +88,26 @@
            return bottomHeight;
        }
        /// <summary>
        /// 设置高亮颜色
        /// 设置高亮颜色(grb)
        /// </summary>
        /// <param name="seleColor">选中颜色值</param>
        /// <param name="unColor">未选中颜色值</param>
        /// <param name="view">组件</param>
        public void SetHighlightBackground(View view)
        public void SetHighlightColor(View view, uint seleColor =seleBackgroundColor, uint unColor = 0x00000000)
        {
            if (view == null)
            {
                return;
            }
            //按下去改变背景颜色
            view.BackgroundColor = AksCommonMethod.seleBackgroundColor;
            view.BackgroundColor = seleColor;
            new System.Threading.Thread(() =>
            {
                System.Threading.Thread.Sleep(millisecondsTimeout);
                Application.RunOnMainThread(() =>
                {
                    //弹起来还原背景颜色
                    view.BackgroundColor = 0x00000000;
                    view.BackgroundColor = unColor;
                });
            })
            { IsBackground = true }.Start();
@@ -110,23 +125,46 @@
                return;
            }
            //按下去改变背景颜色
            button.IsSelected =true;
            button.IsSelected = true;
            new System.Threading.Thread(() =>
            {
                System.Threading.Thread.Sleep(millisecondsTimeout);
                Application.RunOnMainThread(() =>
                {
                    //弹起来还原背景颜色
                    button.IsSelected=false;
                    button.IsSelected = false;
                });
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// 设置高亮背景图标
        /// </summary>
        /// <param name="sele">选中图片路径</param>
        /// <param name="unColor">未选中图片路径<</param>
        /// <param name="view">组件</param>
        public void SetHighlightImagePath(FrameLayout frame, string seleImagePath, string unImagePath)
        {
            if (frame == null)
            {
                return;
            }
            //按下去改变背景颜色
            frame.BackgroundImagePath = seleImagePath;
            new System.Threading.Thread(() =>
            {
                System.Threading.Thread.Sleep(millisecondsTimeout);
                Application.RunOnMainThread(() =>
                {
                    //弹起来还原背景颜色
                    frame.BackgroundImagePath = unImagePath;
                });
            })
            { IsBackground = true }.Start();
        }