Harmony OS 2

HarmonyOS development adds 8 new samples

Huawei HarmonyOS has released new information regarding the HarmonyOS Sample, it added eight super practical application examples, of which three are examples of a declarative paradigm based on TS extensible development.

Explain that “the declarative development paradigm based on TS extension” is one of the two development paradigms provided by the Ark development framework. It adopts a programming approach that is closer to natural semantics, allowing developers to intuitively describe the UI interface without having to care about how the framework implements UI drawing and rendering, achieving minimal and efficient development. The official website document has updated the development guide, and interested friends can go to the official website to learn.

Sample 1: New JS NativeDemo sample

Scenario: This example uses JS and C++ to develop, uses JS to call C++ code, and displays the running result of C++ code on the UI.

Operating environment: HarmonyOS

Advertisement

Source download link:

https://gitee.com/harmonyos/harmonyos_app_samples/tree/master/native/JSNativeDemo

Sample 2: New JS Panel sample

Scenario: This example displays product details and platform guarantees through a sliding panel. JS provides a lightweight content display panel, this panel can be slid, you can customize the trigger method, pop-up height and other attributes.

Operating environment: OpenHarmony

Advertisement

Source download link:

https://gitee.com/openharmony/app_samples/tree/master/UI/JsPanel

Sample 3: New JS List sample

Scenario: This example shows the application of the list control in the product classification list. Two list items are used in the list group to show the two list forms of Group contraction and Group expansion. After clicking, the corresponding list will pop up.

Operating environment: OpenHarmony

Advertisement

Source download link:

https://gitee.com/openharmony/app_samples/tree/master/UI/JsList

Sample 4: New JS Svg sample

Scenario: This example shows the use of the component and its sub-components in JS, including,

Operating environment: OpenHarmony

Advertisement

Source download link:

https://gitee.com/openharmony/app_samples/tree/master/UI/JsSvg

Sample 5: New JS Dialog example

Scenario: This example completes the function of adding and deleting contacts, and uses custom pop-up windows to implement when adding and deleting contacts. JS supports user-defined pop-up windows. Components are used as container components. Users can customize the style and layout of pop-up windows.

Operating environment: OpenHarmony

Advertisement

Source download link:

https://gitee.com/openharmony/app_samples/tree/master/UI/JsDialog

Sample 6: Add eTSBuildCommonView to create a simple view example

Scenario: This example uses a simple page constructed by Stack layout and Flex layout to display pictures and nutritional information of food tomatoes. For details, refer to the official website document: ArkUI-> Declarative Development Paradigm Based on TS Extension -> Experience Declarative UI.

Operating environment: HarmonyOS and OpenHarmony (different operating systems, the sample source code is different)

Advertisement

Run on HarmonyOS source download link:

https://gitee.com/harmonyos/harmonyos_app_samples/tree/master/ETSUI/eTSBuildCommonView

Run on OpenHarmony source download link:

https://gitee.com/openharmony/app_samples/tree/master/UI/eTSBuildCommonView

Sample 7: Add eTSDefiningPageLayoutAndConnection page layout and connection example

Advertisement

Scenario: This example builds a food category list page and a food details page, including: List layout: create a food data model, ForEach loops to render ListItem; Grid layout: display food classification information, create Tabs tabs to display different categories of food; routing mechanism: Data transfer between router interface, Navigator and pages. For details, refer to the official website document: ArkUI-> Declarative Development Paradigm Based on TS Extension -> Page Layout and Connection.

Operating environment: HarmonyOS and OpenHarmony (different operating systems, the sample source code is different)

Run on HarmonyOS source download link:

https://gitee.com/harmonyos/harmonyos_app_samples/tree/master/ETSUI/eTSDefiningPageLayoutAndConnection

Run on OpenHarmony source download link:

Advertisement

https://gitee.com/openharmony/app_samples/tree/master/UI/eTSDefiningPageLayoutAndConnection

Sample 8: Added eTSDrawingAndAnimation drawing and animation examples

Scenario: This example implements the dynamic part of the healthy diet application, including: Logo drawing: use the drawing components Shape and Path to draw the logo of the healthy diet application; splash screen and page transition dynamic effects: explicit animation animateTo realize splash screen animation, add The transition animation of shared elements from the food category list page to the food details page. For details, refer to the official website document: ArkUI-> Declarative Development Paradigm Based on TS Extension -> Drawing and Animation.

Operating environment: HarmonyOS

Source download link:

Advertisement

https://gitee.com/harmonyos/harmonyos_app_samples/tree/master/ETSUI/eTSDrawingAndAnimation.

(Via)

 

Amit

I write about Huawei Latest News, EMUI Updates & more. I am also a fitness freak. For any information, tip or help send me an email at huaweiupdatenews@gmail.com

Share
Published by
Amit

Recent Posts

Huawei Petal Mail App will no longer be available for download

According to the official information, the Huawei released the delisting announcement of its Petal Mail…

5 months ago

Huawei Health App 15.0.10.310 update is now rolling out

Huawei has started rolling out the new November 2024 app update to its Health Application.…

5 months ago

Huawei Mate 70 lineup repair spare parts prices announced

Huawei released the Mate 70 series of mobile phones, with a starting price of 5,499…

5 months ago

Huawei FreeBuds Pro 4 official announcement

Huawei officially announced the new FreeBuds Pro 4 headphones. This is the first TWS headset…

5 months ago

Huawei Mate 70 lineup reservations exceeded 560,000 in 20 minutes

Huawei's Mate 70 series of mobile phones was officially unveiled today. The new series of…

5 months ago

Huawei Mate 70 lineup launch event details revealed: Mate X6, MatePad Pro 13.2 and more

According to the latest information, the Chinese tech giant Huawei is said to launch the…

5 months ago