From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs | 240 +++++++++++++++++++++++++++++++++--------------------------
1 files changed, 133 insertions(+), 107 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs
index 7a34586..cd0e976 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/TypeMultiFramLayout.cs
@@ -3,102 +3,129 @@
using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView
{
- public class TypeMultiFramLayout:BaseFramLayout
+ public class TypeMultiFramLayout
{
+ /// <summary>
+ /// 鏄惁鍙互鐐瑰嚮
+ /// </summary>
+ private bool mIsClick = true;
- private uint UpBackgroundColor = 0x00000000;
- private uint DownBackgroundColor = 0xff454635;
- public TypeMultiFramLayout()
+ /// <summary>
+ /// 璁剧疆鎺у埗鐐瑰嚮浜嬩欢
+ /// </summary>
+ /// <param name="isClick">false鐐瑰嚮鏃犳晥</param>
+ public void setClick(bool isClick)
{
- this.BackgroundColor = MusicColor.ViewColor;
- this.Height = Application.GetRealHeight(40);
- this.Radius = (uint)Application.GetRealHeight(20);
-
+ this.mIsClick = isClick;
}
-
- Button btnLeftImage = new Button
+ private uint UpBackgroundColor =BaseFramLayout.unParentBackgroundColor;
+ private uint DownBackgroundColor =BaseFramLayout.seleBackgroundColor;
+
+ /// <summary>
+ /// 澶氫釜绫诲瀷瀹瑰櫒
+ /// </summary>
+ public FrameLayout multiFramLayout = new FrameLayout
{
- X = Application.GetRealWidth(16),
+ BackgroundColor = MusicColor.ViewColor,
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(311),
+ Height = Application.GetRealHeight(40),
+ Radius = (uint)Application.GetRealHeight(20),
+ };
+
+
+
+ public FrameLayout leftFramLayout = new FrameLayout
+ {
+ X = Application.GetRealWidth(16),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth(139),
+ Height = Application.GetRealHeight(23),
+ Radius = (uint)Application.GetRealHeight(20),
+
+ };
+
+
+ public Button btnLeftImage = new Button
+ {
Width = Application.GetRealWidth(16),
Height = Application.GetRealWidth(16),
- UnSelectedImagePath = "AksIcon/yingku.png",
+ UnSelectedImagePath = "AksIcon/shixuqi.png",
Gravity = Gravity.CenterVertical,
- Name = "btnLeftImage",
+ Name = "btnBottonLeftImage",
};
- Button btnName1 = new Button
+
+ public Button btnLeftName = new Button
{
- Width = Application.GetRealWidth(32),
+ Width = Application.GetRealWidth(100 + 10),
Height = Application.GetRealHeight(23),
+ TextID = StringId.shixuqi,
TextSize = TextSize.Text16,
TextColor = MusicColor.TextColor,
- TextAlignment = TextAlignment.Center,
+ TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
- IsMoreLines = true,
- Name = "btnName",
};
- Button btnRightImage = new Button
+
+
+ public FrameLayout lineFramLayout = new FrameLayout
+ {
+ BackgroundColor = MusicColor.TextColor,
+ Y = Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(1),
+ Height = Application.GetRealHeight(20),
+ };
+
+
+
+ public FrameLayout rightFramLayout = new FrameLayout
+ {
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth(138),
+ Height = Application.GetRealHeight(23),
+ Radius = (uint)Application.GetRealHeight(20),
+
+ };
+
+
+ public Button btnRightImage = new Button
{
Width = Application.GetRealWidth(16),
Height = Application.GetRealWidth(16),
- UnSelectedImagePath = "AksIcon/yingkunext.png",
- Gravity = Gravity.CenterVertical,
- Name = "btnRightImage",
+ UnSelectedImagePath = "AksIcon/xuanze.png",
+ Gravity = Gravity.CenterRight,
};
- public void AddBtnLeftImage()
+ public Button btnRightName = new Button
{
- this.AddChidren(btnLeftImage);
+ Width = Application.GetRealWidth(100 + 16),
+ Height = Application.GetRealHeight(23),
+ TextID = StringId.bofangqi,
+ TextSize = TextSize.Text16,
+ TextColor = MusicColor.TextColor,
+ TextAlignment = TextAlignment.CenterRight,
+ Gravity = Gravity.CenterVertical,
+ Padding = new Padding(0, 0, 0, 0),
+ };
+
+
+ public void AddView(FrameLayout layout)
+ {
+ layout.AddChidren(multiFramLayout);
+ multiFramLayout.AddChidren(leftFramLayout);
+ leftFramLayout.AddChidren(btnLeftImage);
+ leftFramLayout.AddChidren(btnLeftName);
+ multiFramLayout.AddChidren(lineFramLayout);
+ multiFramLayout.AddChidren(rightFramLayout);
+ rightFramLayout.AddChidren(btnRightImage);
+ rightFramLayout.AddChidren(btnRightName);
+ btnLeftName.X = btnLeftImage.Right + Application.GetRealWidth(4);
+ lineFramLayout.X = leftFramLayout.Right;
+ rightFramLayout.X = lineFramLayout.Right;
+ btnRightName.X = Application.GetRealWidth(4);
}
- public void AddBtnName(int gap = 4)
- {
- if (this.IsAddBtn(btnLeftImage))
- {
- btnName1.X = btnLeftImage.Right + Application.GetRealWidth(gap);
- }
-
- //if (btnName.GetTextWidth() < btnName.Width)
- //{
- // btnName.Width = btnName.GetTextWidth();
- //}
- this.AddChidren(btnName1);
- }
-
- public void AddBtnRightImage(int gap = 8)
- {
-
- if (this.IsAddBtn(btnName1))
- {
- btnRightImage.X = btnName1.Right + Application.GetRealWidth(gap);
- if (gap == 8)
- {
- btnRightImage.Width = Application.GetRealWidth(5);
- btnRightImage.Height = Application.GetRealHeight(8);
- }
-
- }
- this.AddChidren(btnRightImage);
- }
-
-
-
-
- public Button GetBtnLeftImage()
- {
- return btnLeftImage;
- }
-
- public Button GetBtnName()
- {
- return btnName1;
- }
-
- public Button GetBtnRightImage()
- {
- return btnRightImage;
- }
public void SetClickUpBackgroundColor(uint backgroundColor)
{
@@ -112,64 +139,63 @@
}
/// <summary>
- /// 浜嬩欢鐩戝惉鏂规硶
+ /// 搴忔椂鍣ㄧ被鍨嬪鍣�
/// </summary>
- /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄;绗簩涓槸鍥炬爣瀵硅薄;绗笁涓槸鐘舵�佸璞�</param>
- public void SetClickListener(Action<FrameLayout, Button, Button, Button> action)
+ /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄</param>
+ public void SetLeftFlClickListener(Action<FrameLayout> action)
{
EventHandler<MouseEventArgs> UpClick = (sender, e) =>
{
- this.BackgroundColor = this.UpBackgroundColor;
- action?.Invoke(this, btnLeftImage, btnName1, btnRightImage);
+ //leftFramLayout.BackgroundColor = this.UpBackgroundColor;
+
//寮硅捣鏉ヨ繕鍘熻儗鏅鑹�
};
- this.MouseUpEventHandler += UpClick;
+ leftFramLayout.MouseUpEventHandler += UpClick;
btnLeftImage.MouseUpEventHandler += UpClick;
- btnName1.MouseUpEventHandler += UpClick;
- btnRightImage.MouseUpEventHandler += UpClick;
+ btnLeftName.MouseUpEventHandler += UpClick;
+
EventHandler<MouseEventArgs> DownClick = (sender, e) =>
{
//鎸変笅鍘绘敼鍙樿儗鏅鑹�
- this.BackgroundColor = this.DownBackgroundColor;
+ //leftFramLayout.BackgroundColor = this.DownBackgroundColor;
+ action?.Invoke(leftFramLayout);
};
- this.MouseDownEventHandler += DownClick;
+ leftFramLayout.MouseDownEventHandler += DownClick;
btnLeftImage.MouseDownEventHandler += DownClick;
- btnName1.MouseDownEventHandler += DownClick;
- btnRightImage.MouseDownEventHandler += DownClick;
+ btnLeftName.MouseDownEventHandler += DownClick;
}
+
/// <summary>
- /// 鍦ㄧ埗甯冨眬鏌ユ壘瀛愭帶浠舵槸鍚﹀瓨鍦�
+ /// 鎾斁鍣ㄧ被鍨嬪鍣�
/// </summary>
- /// <param name="btn">鏌ユ壘瀵硅薄</param>
- /// <returns>瀛樺湪涓簍rue,鍚﹀垯涓篺alse</returns>
- private bool IsAddBtn(View btn)
+ /// <param name="action">鍥炶皟(绗竴涓槸鐖剁被瀵硅薄</param>
+ public void SetRightFlClickListener(Action<FrameLayout> action)
{
-
- if (this.ChildrenCount <= 0 || btn == null)
+ EventHandler<MouseEventArgs> UpClick = (sender, e) =>
{
- return false;
- }
- for (int i = 0; i < this.ChildrenCount; i++)
+ action?.Invoke(rightFramLayout);
+ //rightFramLayout.BackgroundColor = this.UpBackgroundColor;
+
+ //寮硅捣鏉ヨ繕鍘熻儗鏅鑹�
+ };
+ rightFramLayout.MouseUpEventHandler += UpClick;
+ btnRightImage.MouseUpEventHandler += UpClick;
+ btnRightName.MouseUpEventHandler += UpClick;
+
+
+ EventHandler<MouseEventArgs> DownClick = (sender, e) =>
{
- View view = this.GetChildren(i);
- if (view == null)
- {
- continue;
- }
- if (view is Button)
- {
- if (view.Name == btn.Name)
- {
- return true;
- }
- }
+ //鎸変笅鍘绘敼鍙樿儗鏅鑹�
+ //rightFramLayout.BackgroundColor =AksCommonMethod.seleBackgroundColor;
- }
- return false;
-
+ };
+ rightFramLayout.MouseDownEventHandler += DownClick;
+ btnRightImage.MouseDownEventHandler += DownClick;
+ btnRightName.MouseDownEventHandler += DownClick;
}
+
}
}
--
Gitblit v1.8.0