From 74a9ba8e9a2df9c39f9c2eb212a5ac889a055cd4 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 03 十二月 2019 10:47:51 +0800
Subject: [PATCH] 优化UI细节(请合并最新代码)
---
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs | 58 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
index d78cb43..52c85fb 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockAddDevice.cs
@@ -19,7 +19,6 @@
Button roomTextButton = new Button();
Button devicetypeButton = new Button();
VerticalScrolViewLayout middle;
- HorizontalScrolViewLayout devicetypehorizontalScrol1;
FrameLayout clickframeLayout = new FrameLayout();
Button clickbutton = new Button();
Button clicktextcolcrbutton = new Button();
@@ -39,7 +38,7 @@
var titleName = new Button
{
- TextSize = 16,
+ TextSize = 17,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
X = Application.GetRealWidth(160),
@@ -89,6 +88,7 @@
Y = Application.GetRealHeight(92),
//TextID = MyInternationalizationString.customroom,
Text = Config.Instance.Home.GetCurrentFloorName,
+ TextSize = 14,
};
topRowLayout.AddChidren(foolrname);
var dropdown = new Button
@@ -121,15 +121,7 @@
this.AddChidren(roomhorizontalScrol);
- devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
- {
- Width = Application.GetRealWidth(1080 - 58 - 200),
- Height = Application.GetRealHeight(280),
- Y = roomhorizontalScrol.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- X = Application.GetRealWidth(58 + 200),
- };
- this.AddChidren(devicetypehorizontalScrol1);
+
///璁惧绫诲瀷婊戝姩鎺т欢
var devicetypehorizontalScrol = new HorizontalScrolViewLayout()
{
@@ -138,18 +130,20 @@
Y = roomhorizontalScrol.Bottom,
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
X = Application.GetRealWidth(58),
- Radius = (uint)Application.GetRealHeight(50),
+ // Radius = (uint)Application.GetRealHeight(50),
};
this.AddChidren(devicetypehorizontalScrol);
+ devicetypehorizontalScrol.SetCornerWithSameRadius(20,HDLUtils.RectCornerBottomLeft);
middle = new VerticalScrolViewLayout();
middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
middle.X = Application.GetRealWidth(58);
- middle.Radius = (uint)Application.GetRealHeight(50);
+ //middle.Radius = (uint)Application.GetRealHeight(50);
this.AddChidren(middle);
+ middle.SetCornerWithSameRadius(20, HDLUtils.RectCornerTopLeft);
///鐩墠鏀寔鐨勮澶�
List<DeviceType> deviceTypeList = new List<DeviceType> {
@@ -191,6 +185,7 @@
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
X = Application.GetRealWidth(80),
TextID = MyInternationalizationString.selecfoolr,
+ TextSize = 14,
};
foolrbjicon.AddChidren(btnfoolrtext);
@@ -232,6 +227,7 @@
TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
Tag = foolr.Key,
X = btnfoolricon.Right + Application.GetRealWidth(12),
+ TextSize = 14,
};
foolrRowLayout.AddChidren(btnfoolrname);
if (foolrname.Text == foolr.Value)
@@ -350,13 +346,13 @@
if (list.Count == 0)
{
devicetypehorizontalScrol.Height = 0;
- devicetypehorizontalScrol1.Height = 0;
+
middle.Height = 0;
}
else
{
devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
- devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+
middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
}
AllDeviceTypeView(list, devicetypehorizontalScrol);
@@ -389,13 +385,13 @@
if (list.Count == 0)
{
devicetypehorizontalScrol.Height = 0;
- devicetypehorizontalScrol1.Height = 0;
+
middle.Height = 0;
}
else
{
devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
- devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+
middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
}
AllDeviceTypeView(list, devicetypehorizontalScrol);
@@ -610,6 +606,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
+ TextSize = 14,
};
deviceRow.AddChidren(devicename);
switch (common.CommonDevice.Type)
@@ -686,14 +683,7 @@
{
flMain.RemoveFromParent();
};
- var devicefra1 = new FrameLayout
- {
- Width = Application.GetRealWidth(1080),
- Height = Application.GetRealHeight(100),
- Y = Application.GetRealHeight(1920 - 100),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- };
- flMain.AddChidren(devicefra1);
+
var devicefra = new FrameLayout
{
@@ -705,7 +695,7 @@
Radius = (uint)Application.GetRealHeight(60),
};
flMain.AddChidren(devicefra);
-
+ devicefra.SetCornerWithSameRadius(20, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
#region -------鍙栨秷 瀹屾垚
var timetype = new RowLayout
{
@@ -721,6 +711,7 @@
Width = Application.GetRealWidth(200),
X = Application.GetRealWidth(80),
TextAlignment = TextAlignment.CenterLeft,
+ TextSize = 14,
};
timetype.AddChidren(Btncancel);
Btncancel.MouseUpEventHandler += (sender16, e16) =>
@@ -749,6 +740,7 @@
Width = Application.GetRealWidth(200),
TextAlignment = TextAlignment.CenterRight,
X = Btntitle.Right + Application.GetRealWidth(50),
+ TextSize = 14,
};
timetype.AddChidren(Btncomplete);
@@ -833,6 +825,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -863,6 +856,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -893,6 +887,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
takebackrowlayout.AddChidren(btntakeback);
@@ -1043,6 +1038,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -1099,6 +1095,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1130,6 +1127,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
takebackrowlayout.AddChidren(btntakeback);
@@ -1337,6 +1335,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -1394,6 +1393,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1571,6 +1571,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -1601,6 +1602,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1631,6 +1633,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
takebackrowlayout.AddChidren(btntakeback);
@@ -1790,6 +1793,7 @@
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
openrowlayout.AddChidren(btnopen);
@@ -1877,6 +1881,7 @@
Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ TextSize = 14,
};
closerowlayout.AddChidren(btnclose);
@@ -1925,6 +1930,7 @@
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
pausePickerViewfra.Height = Application.GetRealHeight(600);
+ break;
}
}
--
Gitblit v1.8.0