ExamGecko
Question list
Search
Search

Related questions











Question 395 - H14-231_V1.0 discussion

Report
Export

When a developer is developing a smart home application, the Switch component will be used to represent the switch of some devices, and ON should be displayed on the ON status component and OFF should be displayed on the closed state component, what are the following options that can meet the requirements?

A.
Switch btnSwitch=(Switch)findComponentByld(Resource Table.ld_btn_switch); btnSwitch.setStateOffText('OFF'); btnSwitch.setStateONText('ON');
Answers
A.
Switch btnSwitch=(Switch)findComponentByld(Resource Table.ld_btn_switch); btnSwitch.setStateOffText('OFF'); btnSwitch.setStateONText('ON');
B.
<Switch...... ohos:text_state_off='ON' ohos:text_state_on='OFF'> </Switch>
Answers
B.
<Switch...... ohos:text_state_off='ON' ohos:text_state_on='OFF'> </Switch>
C.
Switch btnSwitch=(Switch)findComponentByld(Resource Table.ld_btn_switch); btnSwitch.setStateOffText('ON'); btnSwitch.setStateONText('OFF');
Answers
C.
Switch btnSwitch=(Switch)findComponentByld(Resource Table.ld_btn_switch); btnSwitch.setStateOffText('ON'); btnSwitch.setStateONText('OFF');
D.
<Switch... ... ohos:text_state_off='OFF' ohos:text_state_on='ON'> </Switch>
Answers
D.
<Switch... ... ohos:text_state_off='OFF' ohos:text_state_on='ON'> </Switch>
Suggested answer: A, D
asked 18/09/2024
Francisco Sanchez Valdes
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first