ExamGecko
Question list
Search
Search

Related questions











Question 335 - 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'>
Answers
B.
<Switch... ... Ohos:text_state_off='ON' Ohos:text_state_on='OFF'>
C.
Switch btnSwitch= (Switch)findComponentByld(ResourceTable.ld_btn_switch); btnSwitch.setStateOffText(ON); btnSwitch.setStateONText(OFF);
Answers
C.
Switch btnSwitch= (Switch)findComponentByld(ResourceTable.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
Grant Taylor
58 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first