When a developer is developing a HarmonyOS application, if he needs to annotate information for a certain resource file of different types of elements in the Element directory to facilitate the understanding and use of the resource, which of the following methods can be added (XXX represents the comment text)?
Answer(s): A
If a HarmonyOS developer has developed multiple applications and ensured that the data between different applications cannot be accessed through the triplet of account, application, and database, which of the following services can the developer use to achieve this function?
Answer(s): B
When the developer jumps to a new page through the button button, the following code is created. If you don't add "" Button button = (Button) findComponentByld(ResourceTable.ld_button) ;" What happens to this line of code?Public void onStart(Intent intent){super.onStart(intent);super.setUlContent(ResourceTable.Layout_ability_main);Button button =(Button)findComponentByld(ResourceTable.ld_button);button.setClickedListener(listener -> present(newSecondAbilitySlice(),new Intent()));}
What events can the next piece of code handle?
When a developer subscribes to a public event, he processes the public event in the onReceiveEvent() callback function and writes the following code.EventRunner runner = EventRunner.create();MyEventHandler myHandler = newMyEventHandler(rurner);@Override public void onReceiveEvent(CommonEventData commonEventData){final AsyncCommonEventResult result=goAsyncCommonEvent Runnable task = newRunnable(){@override pub1ic void run {......The action to be performed, defined by the developer result.finishCommonEvent();}};myHandler.postTask(task);}
Post your Comments and Discuss Huawei H14-231_V1.0 exam prep with other Community members: