Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 9 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 9
Topic #: 1
[All Certified Platform Developer II Questions]

<lightning:layout multipleRows="true">
<lightning:layoutItem size="12">{!v.account.Name}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.AccountNumber}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.Industry}
</lightning:layoutItem>
</lightning:layout>
Refer to the component code above. The information displays as expected (in three rows) on a mobile device. However, the information is not displaying as desired (in a single row) on a desktop or tablet.
Which option has the correct component changes to display correctly on desktops and tablets?

  • A. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
  • B. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
  • C. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" mediumDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="4">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
  • D. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
NiuNiuG
Highly Voted 3 years, 10 months ago
C https://developer.salesforce.com/docs/component-library/bundle/lightning:layoutItem/example#lightningcomponentdemo:exampleLayoutItemsSizeOverrides
upvoted 17 times
...
Santosh_1981
Most Recent 12 months ago
Answer is A. The lightning:layoutItem components are assigned sizes based on device sizes (medium and large) to control the layout behavior on different screen sizes. In option A, the sizes are set to "6" for mediumDeviceSize, indicating that each layout item should take up half the width on medium devices (like tablets) and "4" for largeDeviceSize, indicating that each layout item should take up one-third of the width on large devices (like desktops). This configuration allows the information to display correctly on desktops and tablets in a single row, with each item taking up the appropriate width based on the screen size.
upvoted 1 times
...
RuiR17
1 year, 1 month ago
C is the correct
upvoted 1 times
...
MetaLojiqTee
1 year, 3 months ago
Selected Answer: C
Each component will take up all 12/12 columns of a row on small devices, but for medium and larger devices each component will take up 4/12 columns of the row and hence all 3 components will appear in one row
upvoted 1 times
...
salesforceNagibator93
1 year, 7 months ago
https://developer.salesforce.com/docs/component-library/bundle/lightning:layoutItem/documentation - If you specify the size and smallDeviceSize attributes, the size attribute applies to small mobile phones, and the smallDeviceSize applies to smart phones. The sizing attributes are additive and apply to devices of the specified size and larger. For example, if you set mediumDeviceSize=10 and don't set largeDeviceSize, then mediumDeviceSize applies to tablets, desktops, and larger devices. You'd also have to set size to apply to devices smaller than tablets. c is correct
upvoted 2 times
...
sf2022
1 year, 11 months ago
Selected Answer: C
C is correct 3 rows => 12/3 = size 4
upvoted 2 times
...
CaiXiDan
2 years, 4 months ago
C is corret
upvoted 2 times
...
singhkar
3 years, 5 months ago
The correct ans is C https://salesforce.stackexchange.com/questions/305647/responsive-layouts-in-lwc
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...