| | |
| | | /// 设置控制点击事件 |
| | | /// </summary> |
| | | /// <param name="isClick">false点击无效</param> |
| | | public void setClick(bool isClick) |
| | | public void SetClick(bool isClick) |
| | | { |
| | | this.mIsClick = isClick; |
| | | } |
| | | /// <summary> |
| | | /// 设置控制点击事件 |
| | | /// </summary> |
| | | /// <param name="isClick">false点击无效</param> |
| | | public bool GetClick() |
| | | { |
| | | return this.mIsClick; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 延时时间ms |
| | | /// </summary> |
| | | private const int millisecondsTimeout = 100; |
| | | |
| | | /// <summary> |
| | | /// 调整真实高度 |
| | | /// </summary> |
| | |
| | | } |
| | | return bottomHeight; |
| | | } |
| | | /// <summary> |
| | | /// 设置高亮颜色 |
| | | /// </summary> |
| | | /// <param name="view">组件</param> |
| | | public void SetHighlightBackground(View view) |
| | | { |
| | | if (view == null) |
| | | { |
| | | return; |
| | | } |
| | | //按下去改变背景颜色 |
| | | view.BackgroundColor = AksCommonMethod.seleBackgroundColor; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(millisecondsTimeout); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //弹起来还原背景颜色 |
| | | view.BackgroundColor = 0x00000000; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置Button专用 |
| | | /// </summary> |
| | | /// <param name="button">组件</param> |
| | | public void SetButtonIsSelected(Button button) |
| | | { |
| | | if (button == null) |
| | | { |
| | | return; |
| | | } |
| | | //按下去改变背景颜色 |
| | | button.IsSelected =true; |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(millisecondsTimeout); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //弹起来还原背景颜色 |
| | | button.IsSelected=false; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |