diff --git a/AI/AIFunctionSet/entry/src/main/java/ohos/samples/aifunctionset/slice/QRCodeGenerationSlice.java b/AI/AIFunctionSet/entry/src/main/java/ohos/samples/aifunctionset/slice/QRCodeGenerationSlice.java index e6b85ea6220efe2f1a4180109ab401e33d883de5..3c5df1407603ccb6e0867e4ccc6e1b0d2d998cf3 100644 --- a/AI/AIFunctionSet/entry/src/main/java/ohos/samples/aifunctionset/slice/QRCodeGenerationSlice.java +++ b/AI/AIFunctionSet/entry/src/main/java/ohos/samples/aifunctionset/slice/QRCodeGenerationSlice.java @@ -74,7 +74,7 @@ public class QRCodeGenerationSlice extends BaseSlice { aiTitle.setText("QRCode Generation"); } - private ConnectionCallback connectionCallback = new ConnectionCallback() { + private final ConnectionCallback connectionCallback = new ConnectionCallback() { @Override public void onServiceConnect() { LogUtil.info(getLocalClassName(), "Service connect succeeded"); diff --git a/AI/AIFunctionSet/entry/src/main/resources/base/layout/base_layout.xml b/AI/AIFunctionSet/entry/src/main/resources/base/layout/base_layout.xml index d598502a7817c48c38cf77e1df10d25e897b7a64..2954bc9365078bdcb5ed961a8879c23b4b372c95 100644 --- a/AI/AIFunctionSet/entry/src/main/resources/base/layout/base_layout.xml +++ b/AI/AIFunctionSet/entry/src/main/resources/base/layout/base_layout.xml @@ -38,8 +38,10 @@ ohos:id="$+id:title" ohos:height="match_parent" ohos:width="match_content" - ohos:left_margin="15vp" - ohos:left_padding="15vp" + ohos:start_margin="15vp" + ohos:end_margin="0vp" + ohos:end_padding="15vp" + ohos:start_padding="0vp" ohos:multiple_lines="false" ohos:text_alignment="vertical_center" ohos:text_color="#ff000000" diff --git a/AI/AIFunctionSet/entry/src/main/resources/base/layout/speech_recognition_slice.xml b/AI/AIFunctionSet/entry/src/main/resources/base/layout/speech_recognition_slice.xml index 3e158a803d640d127fe9882cfc13a0ff3bea97b2..ae776a69aa9c8ca99bab56c3d5bc20ec4bab0628 100644 --- a/AI/AIFunctionSet/entry/src/main/resources/base/layout/speech_recognition_slice.xml +++ b/AI/AIFunctionSet/entry/src/main/resources/base/layout/speech_recognition_slice.xml @@ -25,9 +25,9 @@ ohos:height="match_content" ohos:width="match_parent" ohos:focusable="focus_disable" - ohos:left_margin="10vp" + ohos:start_margin="10vp" ohos:padding="10vp" - ohos:right_margin="10vp" + ohos:end_margin="10vp" ohos:text="$string:file_path" ohos:text_size="16fp"/> diff --git a/AI/AIFunctionSet/entry/src/main/resources/base/layout/text_to_speech_slice.xml b/AI/AIFunctionSet/entry/src/main/resources/base/layout/text_to_speech_slice.xml index bd39c6c9648fe0d94b2cc4bb8576018217d16f1c..fbedc71a8a63f7a422657cb5aa1bd56172165419 100644 --- a/AI/AIFunctionSet/entry/src/main/resources/base/layout/text_to_speech_slice.xml +++ b/AI/AIFunctionSet/entry/src/main/resources/base/layout/text_to_speech_slice.xml @@ -27,9 +27,9 @@ ohos:background_element="$graphic:textfield_bg" ohos:focusable="focus_adaptable" ohos:hint="$string:enter_keyword_tips" - ohos:left_margin="10vp" + ohos:start_margin="10vp" ohos:padding="10vp" - ohos:right_margin="10vp" + ohos:end_margin="10vp" ohos:text_alignment="center" ohos:text_size="16fp"/> diff --git a/AI/AIFunctionSet/entry/src/main/resources/base/layout/word_segmentation_slice.xml b/AI/AIFunctionSet/entry/src/main/resources/base/layout/word_segmentation_slice.xml index a19b1ca6291f8dd394ee9678a9c8cfa108e5ef89..8521c7514b09d08f375da11a25726bd8a190910f 100644 --- a/AI/AIFunctionSet/entry/src/main/resources/base/layout/word_segmentation_slice.xml +++ b/AI/AIFunctionSet/entry/src/main/resources/base/layout/word_segmentation_slice.xml @@ -27,9 +27,9 @@ ohos:width="match_parent" ohos:background_element="$graphic:textfield_bg" ohos:hint="$string:enter_keyword_tips" - ohos:left_margin="10vp" + ohos:start_margin="10vp" ohos:padding="10vp" - ohos:right_margin="10vp" + ohos:end_margin="10vp" ohos:text_alignment="center" ohos:text_size="16fp"/> @@ -48,8 +48,8 @@ ohos:width="match_content" ohos:background_element="$graphic:textfield_bg" ohos:focusable="focus_disable" - ohos:left_margin="20vp" - ohos:right_margin="20vp" + ohos:start_margin="20vp" + ohos:end_margin="20vp" ohos:text_size="16fp"/> \ No newline at end of file diff --git a/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/slice/MainAbilitySlice.java b/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/slice/MainAbilitySlice.java index c1de11b04713e9abe0d496998ed5d19dd2761e69..595790d8e2e3251fdf3674b449e83586f4b2abee 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/slice/MainAbilitySlice.java +++ b/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/slice/MainAbilitySlice.java @@ -89,9 +89,10 @@ public class MainAbilitySlice extends AbilitySlice { super.onForeground(intent); } + private void initUi() { listview = (ListContainer)this.findComponentById(ResourceTable.Id_listview); - fileProvider = new FileListProvider(this, mFileList); + fileProvider = new FileListProvider<>(this, mFileList); listview.setItemProvider(fileProvider); listview.setVisibility(Component.HIDE); diff --git a/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/ui/DeviceSelectDialog.java b/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/ui/DeviceSelectDialog.java index 3ad49692cb82f752d318952fcd8bfd479f82f52f..2c5e24c85d432bdc15d9c414ba829a6efff170cb 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/ui/DeviceSelectDialog.java +++ b/CompleteApps/DistributedSearch/entry/src/main/java/ohos/samples/distributedsearch/ui/DeviceSelectDialog.java @@ -49,6 +49,8 @@ public class DeviceSelectDialog extends CommonDialog { private DeviceInfo checkedDevice; + + /** * Instantiates a new Device select dialog. * @@ -73,6 +75,7 @@ public class DeviceSelectDialog extends CommonDialog { } private List initDeviceData() { + LogUtil.info(TAG, "begin to initDeviceData"); List deviceInfoList = DeviceManager.getDeviceList(DeviceInfo.FLAG_GET_ONLINE_DEVICE); List deviceList = new ArrayList<>(); diff --git a/CompleteApps/DistributedSearch/entry/src/main/resources/base/element/string.json b/CompleteApps/DistributedSearch/entry/src/main/resources/base/element/string.json index 06fccf1a5099eab602330a845a939489ca235005..cdc7ef1a8683bf9c0ed4475dd8a050a03c0876e0 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/resources/base/element/string.json +++ b/CompleteApps/DistributedSearch/entry/src/main/resources/base/element/string.json @@ -83,6 +83,10 @@ { "name": "delete_label", "value": "Delete" + }, + { + "name": "Enter_the_key_to_search", + "value": "Enter the key to search" } ] } \ No newline at end of file diff --git a/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/ability_everything.xml b/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/ability_everything.xml index 4add09685f64e813ce4640a732663caeab077f43..170b71cd93d5eb9f01bbcd7234b52814bef363cf 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/ability_everything.xml +++ b/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/ability_everything.xml @@ -23,11 +23,11 @@ ohos:width="284vp" ohos:id="$+id:textEntry" ohos:background_element="$graphic:background_text_field" - ohos:hint="Enter the key to search" + ohos:hint="$string:Enter_the_key_to_search" ohos:text_alignment="vertical_center" ohos:text_size="24vp" - ohos:left_padding="8vp" - ohos:right_padding="24vp" + ohos:start_padding="8vp" + ohos:end_padding="24vp" ohos:bottom_padding="8vp" ohos:multiple_lines="false" /> @@ -64,7 +64,8 @@ ohos:layout_alignment="left" ohos:orientation="horizontal" ohos:top_margin="0vp" - ohos:left_margin="0vp"> + ohos:start_margin="0vp" + ohos:end_margin="0vp"> + ohos:end_margin="20vp"> @@ -35,7 +37,8 @@ ohos:id="$+id:item_image_info" ohos:height="35vp" ohos:width="100vp" - ohos:left_margin="8vp" + ohos:start_margin="8vp" + ohos:end_margin="0vp" ohos:max_text_lines="1" ohos:text_alignment="top" ohos:text_size="12vp" diff --git a/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/dialog_layout_device.xml b/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/dialog_layout_device.xml index 688fa428517af96422313752ceaf96907803490c..6746aca0c847b8c8845cc64c39200da0fedf0c14 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/dialog_layout_device.xml +++ b/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/dialog_layout_device.xml @@ -11,15 +11,16 @@ ohos:width="match_parent" ohos:background_element="$graphic:background_white_radius_10" ohos:bottom_margin="10vp" - ohos:left_margin="20vp" + ohos:start_margin="20vp" ohos:orientation="vertical" - ohos:right_margin="20vp" + ohos:end_margin="20vp" > diff --git a/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/widget_helper.xml b/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/widget_helper.xml index 9ef4055d4e2890cb6d4eaab5144ef48bb9531107..7d6eca06b80024fde1916feb2c021be11817fdcb 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/widget_helper.xml +++ b/CompleteApps/DistributedSearch/entry/src/main/resources/base/layout/widget_helper.xml @@ -10,8 +10,8 @@ ohos:multiple_lines="true" ohos:height="match_content" ohos:width="match_content" - ohos:left_padding="30" - ohos:right_padding="30" + ohos:start_padding="30" + ohos:end_padding="30" ohos:top_padding="20" ohos:bottom_padding="20" ohos:text_size="48" diff --git a/CompleteApps/DistributedSearch/entry/src/main/resources/en/element/string.json b/CompleteApps/DistributedSearch/entry/src/main/resources/en/element/string.json index 042ec64927e661175f8572d0ff706c7cd06136fd..27213fdff7169da33f74d40a8c866d3a9564f12d 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/resources/en/element/string.json +++ b/CompleteApps/DistributedSearch/entry/src/main/resources/en/element/string.json @@ -83,6 +83,10 @@ { "name": "delete_label", "value": "Delete" + }, + { + "name": "Enter_the_key_to_search", + "value": "Enter the key to search" } ] } diff --git a/CompleteApps/DistributedSearch/entry/src/main/resources/zh/element/string.json b/CompleteApps/DistributedSearch/entry/src/main/resources/zh/element/string.json index 31972b4e017528f78529ff60bf1015a088f38919..c35c2b0ae3fe8b28e04509ab30eb85678f9e5ed2 100644 --- a/CompleteApps/DistributedSearch/entry/src/main/resources/zh/element/string.json +++ b/CompleteApps/DistributedSearch/entry/src/main/resources/zh/element/string.json @@ -83,6 +83,10 @@ { "name": "delete_label", "value": "删除" + }, + { + "name": "Enter_the_key_to_search", + "value": "Enter the key to search" } ] } \ No newline at end of file diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/SharedService.java b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/SharedService.java index 730a7af7a0117704aa2ce756d917dc10cf04665d..bcd1f71a95b7cb812d577083619d829982914b4d 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/SharedService.java +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/SharedService.java @@ -46,7 +46,7 @@ public class SharedService extends Ability { /** * MyBinder class */ - private class MyBinder extends NewsDemoIDLStub { + private static class MyBinder extends NewsDemoIDLStub { MyBinder(String descriptor) { super(descriptor); } diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/been/ShoppingCartManage.java b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/been/ShoppingCartManage.java index f54f0118f783b618b3cf761fbbab2c48e641a4ff..6b2062ab68d1e7da045bd9bc1e2823797f954390 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/been/ShoppingCartManage.java +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/been/ShoppingCartManage.java @@ -43,7 +43,6 @@ public class ShoppingCartManage { public static final String SUB_EVENT = "SUB_EVENT"; public static final String ACTION_EVENT = "ACTION_EVENT"; - public static final String ACTION_DEV_NAME = "ACTION_DEV_NAME"; public static final String MEGER_EVENT = "meger"; public static final String SHARE_EVENT = "share"; public static final String TOTAL_MONEY = "TOTAL_MONEY"; @@ -56,7 +55,7 @@ public class ShoppingCartManage { * * @return the device info */ - public static final List getDevices() { + public static List getDevices() { if (DEVICES.size() > 0) { DEVICES.clear(); } diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowOrderSlice.java b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowOrderSlice.java index 73730132438fc57a920e700e6067dff1c2b11287..1181744dd58f7c64b24b8947bea40ac9b86ad63b 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowOrderSlice.java +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowOrderSlice.java @@ -28,7 +28,7 @@ public class ShowOrderSlice extends AbilitySlice { private static final String ZERO_STR = ".00"; private static final String MONEY_STR = ":¥"; - private Text commitOrder; + @Override protected void onStart(Intent intent) { @@ -38,6 +38,7 @@ public class ShowOrderSlice extends AbilitySlice { } private void initView(Intent intent) { + Text commitOrder; int total = intent.getIntParam(ShoppingCartManage.TOTAL_MONEY,0); int discount = intent.getIntParam(ShoppingCartManage.DISCOUNT_MONEY,0); Text textTotal = (Text)findComponentById(ResourceTable.Id_pro_money); diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowPaySlice.java b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowPaySlice.java index 8ed169925d1f10713a25f1fbe869f2d0a777c36f..9fb448db5bc4c4b012b149e20bbe1cb9cea7e1e7 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowPaySlice.java +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/slice/ShowPaySlice.java @@ -26,7 +26,6 @@ import ohos.samples.distributedshoppingcart.been.ShoppingCartManage; * ShowPaySlice */ public class ShowPaySlice extends AbilitySlice { - private Text pay; private Image payHuawei; private Image payBankCard; private Image payYunQuick; @@ -39,6 +38,7 @@ public class ShowPaySlice extends AbilitySlice { } private void initView(Intent intent) { + Text pay; String money = intent.getStringParam(ShoppingCartManage.NEED_PAY); Text payMoney = (Text)findComponentById(ResourceTable.Id_need_pay_money); payMoney.setText(money); diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/CommonUtils.java b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/CommonUtils.java index d387ba26e361f30e5ab5cc5dc1e7a9910ff7e734..77d11065530c4ec4f1347a7d1be17cc61140224e 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/CommonUtils.java +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/CommonUtils.java @@ -34,7 +34,6 @@ import java.util.Optional; */ public class CommonUtils { private static final String TAG = "Common Utils"; - private static final int GET_COLOR_STATE_FAILED = -1; private static final int JSON_READ_ERROR = -1; /** diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/DiscountDetailDialog.java b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/DiscountDetailDialog.java index 27a35264e39d694183f55dd81b77898ff16a4ed2..d3502a410b732a7032d255ae48373ac7a49159f8 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/DiscountDetailDialog.java +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/java/ohos/samples/distributedshoppingcart/utils/DiscountDetailDialog.java @@ -47,8 +47,8 @@ public class DiscountDetailDialog { private final int count; private CommonDialog commonDialog; - private int[] text = {0}; - private int[] srcMoney = {0}; + private final int[] text = {0}; + private final int[] srcMoney = {0}; public DiscountDetailDialog(Context context, int[] text, int[] src, int count) { System.arraycopy(text, 0, this.text, 0, text.length); diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/element/string.json b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/element/string.json index 9215285686170508472813e64741997f7c2586e9..8a00ef6030625154c2e74c316e507b3f28376c44 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/element/string.json +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/element/string.json @@ -219,6 +219,34 @@ { "name": "shared_cart_label", "value": "Shared shopping cart" + }, + { + "name": "RMB01", + "value": "¥0.00" + }, + { + "name": "RMB02", + "value": "-¥0.00" + }, + { + "name": "num1", + "value": "1" + }, + { + "name": "price2349", + "value": "¥2439.00" + }, + { + "name": "HUAWEI_Card", + "value": "HUAWEI Card" + }, + { + "name": "price2756", + "value": "¥2756.00" + }, + { + "name": "price317", + "value": "-¥317.00" } ] } \ No newline at end of file diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/add_product_dialog.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/add_product_dialog.xml index d740db8a1b58a9c46ee5c42a5546bc1c9f565a98..05dedee8b9ca0f4c93a58bdcf52bcbb6ec2539eb 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/add_product_dialog.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/add_product_dialog.xml @@ -26,7 +26,8 @@ ohos:width="match_content" ohos:height="match_content" ohos:top_margin="40vp" - ohos:left_margin="52vp" + ohos:start_margin="52vp" + ohos:end_margin="0vp" ohos:image_src="$media:icon_select2"/> diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/device_list_dialog.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/device_list_dialog.xml index 41cbc02b52a89d52544baf2db8a3b64d1b4ff0dd..a9c115d8bbc90f120fbdd232386e9dc93a253fba 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/device_list_dialog.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/device_list_dialog.xml @@ -30,7 +30,8 @@ ohos:text_size="20vp" ohos:weight="6vp" ohos:height="100px" - ohos:left_margin="40px" + ohos:start_margin="40px" + ohos:end_margin="0px" ohos:width="300px" ohos:text="$string:device_select_label" ohos:text_alignment="center"/> @@ -39,7 +40,8 @@ ohos:width="72px" ohos:height="72px" ohos:top_margin="20px" - ohos:left_margin="320px" + ohos:start_margin="320px" + ohos:end_margin="0px" ohos:right_of="$id:dev_title" ohos:image_src="$media:icon_cancel"/> @@ -43,7 +45,8 @@ ohos:text="$string:amount_notice_info" ohos:text_alignment="center" ohos:top_margin="30px" - ohos:left_margin="30px" + ohos:start_margin="30px" + ohos:end_margin="0px" ohos:text_size="12vp" ohos:weight="4vp"/> @@ -200,7 +213,8 @@ ohos:width="450px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="50px" + ohos:start_margin="50px" + ohos:end_margin="0px" ohos:text_size="18vp" ohos:text="$string:total_0_label" ohos:text_color="#F93737" @@ -210,7 +224,8 @@ ohos:width="400px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="80px" + ohos:start_margin="80px" + ohos:end_margin="0px" ohos:right_of="$id:meger_total_money" ohos:text_size="14vp" ohos:text="$string:discount_0label" @@ -221,7 +236,8 @@ ohos:height="50px" ohos:width="50px" ohos:top_margin="10px" - ohos:left_margin="30px" + ohos:start_margin="30px" + ohos:end_margin="0px" ohos:image_src="$media:icon_mingxi" ohos:right_of="$id:meger_total_discount" /> @@ -235,7 +251,8 @@ ohos:height="60px" ohos:below="$id:meger_total_money" ohos:text_alignment="left" - ohos:left_margin="50px" + ohos:start_margin="50px" + ohos:end_margin="0px" ohos:text_size="18vp" ohos:text="$string:my_0_label" ohos:text_color="#F93737" @@ -245,7 +262,8 @@ ohos:width="290px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="240px" + ohos:start_margin="240px" + ohos:end_margin="0px" ohos:end_of="$id:meger_total_my_money" ohos:below="$id:meger_total_discount" ohos:text_size="14vp" @@ -262,7 +280,8 @@ ohos:height="60px" ohos:below="$id:meger_total_my_money" ohos:text_alignment="left" - ohos:left_margin="50px" + ohos:start_margin="50px" + ohos:end_margin="0px" ohos:text_size="18vp" ohos:text="$string:xiaowang_0_label" ohos:text_color="#F93737" @@ -272,7 +291,8 @@ ohos:width="290px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="240px" + ohos:start_margin="240px" + ohos:end_margin="0px" ohos:end_of="$id:meger_total_some_money" ohos:below="$id:meger_total_my_price" ohos:text_size="14vp" @@ -288,7 +308,8 @@ ohos:id="$+id:meger_select_all" ohos:height="54px" ohos:width="54px" - ohos:left_margin="90px" + ohos:start_margin="90px" + ohos:end_margin="0px" ohos:top_margin="60px" ohos:image_src="$media:icon_select"/> @@ -24,12 +25,14 @@ ohos:width="72px" ohos:image_src="$media:icon_share" ohos:right_of="$id:myshopping_cart" - ohos:left_margin="500px"/> + ohos:start_margin="500px" + ohos:end_margin="0px"/> @@ -81,7 +84,8 @@ ohos:width="450px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="50px" + ohos:start_margin="50px" + ohos:end_margin="0px" ohos:text_size="18vp" ohos:text="$string:total_0_label" ohos:text_color="#F93737" @@ -91,7 +95,8 @@ ohos:width="400px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="80px" + ohos:start_margin="80px" + ohos:end_margin="0px" ohos:right_of="$id:meger_total_money" ohos:text_size="14vp" ohos:text="$string:discount_0label" @@ -102,7 +107,8 @@ ohos:height="50px" ohos:width="50px" ohos:top_margin="10px" - ohos:left_margin="30px" + ohos:start_margin="30px" + ohos:end_margin="0px" ohos:image_src="$media:icon_mingxi" ohos:right_of="$id:meger_total_discount" /> @@ -116,7 +122,8 @@ ohos:height="60px" ohos:below="$id:meger_total_money" ohos:text_alignment="left" - ohos:left_margin="50px" + ohos:start_margin="50px" + ohos:end_margin="0px" ohos:text_size="18vp" ohos:text="$string:my_0_label" ohos:text_color="#F93737" @@ -126,7 +133,8 @@ ohos:width="290px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="240px" + ohos:start_margin="240px" + ohos:end_margin="0px" ohos:end_of="$id:meger_total_my_money" ohos:below="$id:meger_total_discount" ohos:text_size="14vp" @@ -143,7 +151,8 @@ ohos:height="60px" ohos:below="$id:meger_total_my_money" ohos:text_alignment="left" - ohos:left_margin="50px" + ohos:start_margin="50px" + ohos:end_margin="0px" ohos:text_size="18vp" ohos:text="$string:xiaowang_0_label" ohos:text_color="#F93737" @@ -153,7 +162,8 @@ ohos:width="290px" ohos:height="60px" ohos:text_alignment="left" - ohos:left_margin="240px" + ohos:start_margin="240px" + ohos:end_margin="0px" ohos:end_of="$id:meger_total_some_money" ohos:below="$id:meger_total_my_price" ohos:text_size="14vp" @@ -169,7 +179,8 @@ ohos:id="$+id:meger_select_all" ohos:height="54px" ohos:width="54px" - ohos:left_margin="90px" + ohos:start_margin="90px" + ohos:end_margin="0px" ohos:top_margin="60px" ohos:image_src="$media:icon_select"/> diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_money.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_money.xml index fbc6a927fd3e2d840c1b033cd1678a1db7168118..27e7b319fd3ec102a439024da81915029795bb08 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_money.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_money.xml @@ -10,7 +10,8 @@ ohos:width="300px" ohos:text="$string:cashier_label" ohos:text_alignment="left" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text_size="20vp" ohos:weight="6vp" /> @@ -23,7 +24,7 @@ ohos:id="$+id:need_pay_money" ohos:height="130px" ohos:width="match_parent" - ohos:text="¥2439.00" + ohos:text="$string:price2349" ohos:text_alignment="center" ohos:top_margin="100px" ohos:text_size="20vp" @@ -48,8 +49,9 @@ ohos:height="60px" ohos:width="400px" ohos:id="$+id:huawei_card" - ohos:text="HUAWEI Card" - ohos:left_margin="20px" + ohos:text="$string:HUAWEI_Card" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:top_margin="30px" ohos:text_size="14vp" ohos:weight="4vp" @@ -59,7 +61,8 @@ ohos:height="54px" ohos:width="54px" ohos:top_margin="30px" - ohos:left_margin="400px" + ohos:start_margin="400px" + ohos:end_margin="0px" ohos:right_of="$id:huawei_card" ohos:image_src="$media:icon_select"/> @@ -72,7 +75,8 @@ ohos:width="400px" ohos:id="$+id:yun_quick" ohos:text="$string:cloud_pay_label" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:top_margin="30px" ohos:text_size="14vp" ohos:weight="4vp" @@ -81,7 +85,8 @@ ohos:id="$+id:pay_yun_quick" ohos:height="54px" ohos:width="54px" - ohos:left_margin="400px" + ohos:start_margin="400px" + ohos:end_margin="0px" ohos:top_margin="30px" ohos:right_of="$id:yun_quick" ohos:image_src="$media:icon_unselect"/> @@ -96,7 +101,8 @@ ohos:width="400px" ohos:id="$+id:bank_card" ohos:text="$string:bank_card_pay_label" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:top_margin="30px" ohos:text_size="14vp" ohos:weight="4vp" @@ -107,7 +113,8 @@ ohos:width="54px" ohos:right_of="$id:bank_card" ohos:top_margin="30px" - ohos:left_margin="400px" + ohos:start_margin="400px" + ohos:end_margin="0px" ohos:image_src="$media:icon_unselect"/> @@ -117,7 +124,8 @@ ohos:height="140px" ohos:background_element="$graphic:corner_bg_comment" ohos:text_alignment="center" - ohos:left_margin="115px" + ohos:start_margin="115px" + ohos:end_margin="0px" ohos:align_parent_bottom="true" ohos:text_color="white" ohos:text_size="20vp" diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_success.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_success.xml index 045172960b6e2dfc6c5d43470661596cc4a178ce..2a6011c9e192d215edcf0753ffedd0612cf83226 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_success.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/pay_success.xml @@ -13,7 +13,8 @@ ohos:width="400px" ohos:id="$+id:pay_succ" ohos:text="$string:pay_success_label" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text_size="20vp" ohos:weight="6vp" /> @@ -23,7 +24,8 @@ ohos:id="$+id:to_first_slice" ohos:text="$string:finish_label" ohos:right_of="$+id:pay_succ" - ohos:left_margin="480px" + ohos:start_margin="480px" + ohos:end_margin="0px" ohos:text_size="14vp" ohos:weight="4vp" /> diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_detail_layout.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_detail_layout.xml index 9a888023c3689dc31c2d8e592aebad02a20d2525..85821ab99944dd44dd2576e012abd3d62febe9d9 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_detail_layout.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_detail_layout.xml @@ -42,7 +42,8 @@ ohos:width="280px" ohos:below="$id:image_content" ohos:top_margin="20px" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text_color="red" ohos:text_size="18vp" ohos:weight="6"/> @@ -55,7 +56,8 @@ ohos:text_alignment="left" ohos:multiple_lines="true" ohos:top_margin="20px" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text_size="16vp"/> @@ -136,7 +140,8 @@ ohos:height="match_content" ohos:width="350px" ohos:right_of="$id:item_head_activety" - ohos:left_padding="5px" + ohos:start_padding="5px" + ohos:end_padding="0px" ohos:text_color="red" ohos:text="$string:activity_618_label" ohos:text_size="16vp" @@ -154,26 +159,30 @@ ohos:top_margin="30px" ohos:height="72px" ohos:width="72px" - ohos:left_margin="40px" + ohos:start_margin="40px" + ohos:end_margin="0px" ohos:image_src="$media:icon_dianpu"/> + ohos:start_margin="145px" + ohos:end_margin="0px"> diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_list_layout.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_list_layout.xml index 51fb850543274006e691a90f94a5ddf27030fad7..cac37620a38fefd0dc30a32528c86e01bf347700 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_list_layout.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/product_list_layout.xml @@ -33,29 +33,34 @@ + ohos:start_margin="145px" + ohos:end_margin="0px"> \ No newline at end of file diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_meger_dialog.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_meger_dialog.xml index 07d60ff378dba11a74f26162463f3f27d5c52626..65d2b613d61d6e9da2c16179eeb6e1fe782e3be3 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_meger_dialog.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_meger_dialog.xml @@ -27,14 +27,16 @@ ohos:width="72px" ohos:height="72px" ohos:top_margin="40px" - ohos:left_margin="750px" + ohos:start_margin="750px" + ohos:end_margin="0px" ohos:image_src="$media:icon_cancel"/> @@ -46,8 +48,8 @@ ohos:text_alignment="left" ohos:multiple_lines="true" ohos:top_margin="30px" - ohos:left_margin="30px" - ohos:right_margin="30px" + ohos:start_margin="30px" + ohos:end_margin="30px" ohos:max_text_lines="3" ohos:text_size="14vp" ohos:weight="4vp"/> @@ -61,7 +63,8 @@ ohos:height="100px" ohos:width="match_content" ohos:text="$string:cancel_label" - ohos:left_margin="60px" + ohos:start_margin="60px" + ohos:end_margin="0px" ohos:text_size="16vp" ohos:text_color="#777777" ohos:weight="5vp"/> @@ -70,7 +73,8 @@ ohos:height="100px" ohos:width="match_content" ohos:text="$string:agree_label" - ohos:left_margin="520px" + ohos:start_margin="0px" + ohos:end_margin="520px" ohos:right_of="$id:text_meger_cancel" ohos:text_color="#F93737" ohos:text_size="16vp" diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shoping_cart_list.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shoping_cart_list.xml index 6f494e2a8e346339cdc30d2c89c114b5cb8f9cf7..b58fd57d08e892f158c4f0375039be2fe5dc8136 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shoping_cart_list.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shoping_cart_list.xml @@ -12,7 +12,8 @@ ohos:id="$+id:pro_select" ohos:height="54px" ohos:width="54px" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:top_margin="148px" ohos:image_src="$media:icon_select"/> @@ -70,17 +72,19 @@ ohos:height="match_content" ohos:width="60px" ohos:below="$id:item_pro_param2" - ohos:left_margin="30px" + ohos:start_margin="30px" + ohos:end_margin="0px" ohos:right_of="$id:item_pro_dec" ohos:text_size="16vp" ohos:text_alignment="center" - ohos:text="1" + ohos:text="$string:num1" ohos:weight="4"/> @@ -91,7 +95,8 @@ ohos:below="$id:item_pro_price" ohos:right_of="$id:item_pro_image" ohos:background_element="$graphic:corner_bg_text" - ohos:left_padding="5px" + ohos:start_padding="5px" + ohos:end_padding="0px" ohos:text_color="red" ohos:text_size="12vp" ohos:weight="3"/> diff --git a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shopping_cart.xml b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shopping_cart.xml index 995e7fd6b1aa8356d6bfba9d8ca99fc7733ec9f8..a2dfde09552ca8b98626db2731ddf9a628c026cf 100644 --- a/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shopping_cart.xml +++ b/CompleteApps/DistributedShoppingCart/entry/src/main/resources/base/layout/share_shopping_cart.xml @@ -14,7 +14,8 @@ ohos:width="300px" ohos:id="$+id:myshopping_cart" ohos:text="$string:shopping_cart_slice" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text_size="20vp" ohos:weight="6vp" /> @@ -24,12 +25,14 @@ ohos:width="72px" ohos:image_src="$media:icon_share" ohos:right_of="$id:myshopping_cart" - ohos:left_margin="500px"/> + ohos:start_margin="500px" + ohos:end_margin="0px"/> @@ -64,8 +67,8 @@ @@ -73,7 +76,8 @@ ohos:id="$+id:rb_select_all" ohos:height="54px" ohos:width="54px" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:top_margin="50px" ohos:image_src="$media:icon_select"/> @@ -29,7 +30,8 @@ ohos:id="$+id:default_addr" ohos:text="$string:default_label" ohos:background_element="#F93737" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text_size="14vp" ohos:text_color="$color:white" ohos:weight="5vp" @@ -38,7 +40,8 @@ ohos:id="$+id:addr" ohos:height="60px" ohos:width="match_parent" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text="$string:address_info" ohos:multiple_lines="true" ohos:right_of="$id:default_addr" @@ -49,7 +52,8 @@ ohos:height="60px" ohos:width="match_parent" ohos:text="$string:phone_info" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:below="$id:addr" ohos:text_size="14vp" ohos:weight="4vp" @@ -65,7 +69,8 @@ ohos:width="300px" ohos:id="$+id:head_pro_money" ohos:text="$string:commodity_amount_label" - ohos:left_margin="20px" + ohos:start_margin="20px" + ohos:end_margin="0px" ohos:text_size="14vp" ohos:weight="4vp" /> @@ -74,10 +79,11 @@ ohos:height="match_parent" ohos:width="match_parent" ohos:right_of="$id:head_pro_money" - ohos:text=" ¥2756.00" + ohos:text="$string:price2756" ohos:text_size="14vp" ohos:weight="4vp" - ohos:left_margin="200px"/> + ohos:start_margin="200px" + ohos:end_margin="0px"/> @@ -103,10 +110,11 @@ ohos:height="match_parent" ohos:width="match_parent" ohos:right_of="$id:head_pro_tansmoney" - ohos:text=" ¥0.00" + ohos:text="$string:RMB01" ohos:text_size="14vp" ohos:weight="4vp" - ohos:left_margin="200px"/> + ohos:start_margin="200px" + ohos:end_margin="0px"/> @@ -132,10 +141,11 @@ ohos:height="match_parent" ohos:width="match_parent" ohos:right_of="$id:head_pro_discountmoney" - ohos:text="-¥317.00" + ohos:text="$string:price317" ohos:text_size="14vp" ohos:weight="4vp" - ohos:left_margin="200px"/> + ohos:start_margin="200px" + ohos:end_margin="0px"/> @@ -164,7 +175,8 @@ ohos:text="$string:no_available_info" ohos:text_size="14vp" ohos:weight="4vp" - ohos:left_margin="200px"/> + ohos:start_margin="200px" + ohos:end_margin="0px"/> @@ -195,16 +208,17 @@ ohos:height="80px" ohos:width="match_parent" ohos:right_of="$id:myshopping_cart" - ohos:text=" :¥2439.00" + ohos:text="$string:price2349" ohos:text_size="14vp" ohos:weight="4vp" - ohos:left_margin="200px"/> + ohos:start_margin="200px" + ohos:end_margin="0px"/> T getView(int resId) { Component view = mViews.get(resId); if (view == null) { diff --git a/CompleteApps/TicTacToeGame/entry/src/main/resources/base/element/string.json b/CompleteApps/TicTacToeGame/entry/src/main/resources/base/element/string.json index ebd78545d6dbacd9af10b86e3e2f3944717baaf2..b4179ae8ab26c5e5c95bf245f2eded65786d96c8 100644 --- a/CompleteApps/TicTacToeGame/entry/src/main/resources/base/element/string.json +++ b/CompleteApps/TicTacToeGame/entry/src/main/resources/base/element/string.json @@ -47,6 +47,10 @@ { "name": "add_device_label", "value": "Add game device" + }, + { + "name": "num0", + "value": "0" } ] } \ No newline at end of file diff --git a/CompleteApps/TicTacToeGame/entry/src/main/resources/base/layout/ability_main.xml b/CompleteApps/TicTacToeGame/entry/src/main/resources/base/layout/ability_main.xml index f1d2135e5c837509eb45f837dc11a45aa3dfd1c8..131e45f084ae3442372f0dda0e055a49a0724515 100644 --- a/CompleteApps/TicTacToeGame/entry/src/main/resources/base/layout/ability_main.xml +++ b/CompleteApps/TicTacToeGame/entry/src/main/resources/base/layout/ability_main.xml @@ -24,11 +24,11 @@ ohos:width="match_content" ohos:height="match_content" ohos:top_margin="217px" - ohos:left_margin="309px" + ohos:start_margin="309px" + ohos:end_margin="0px" ohos:text="$string:title_label" ohos:text_size="64px" ohos:text_color="white" - ohos:text_font="PingFangSC-Medium" />