Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

sapui5 - Why are heights of some UI components smaller than usual?

I have created two apps and both has the same content.
App 1 is created with Flexbile Column Layout:
enter image description here

App 2 without:
enter image description here

As you recognized, UI components on App 2 are bigger than on App 1.

I am using the same controls on both:

<Page id="page" title="{i18n>title}">
  <FlexBox alignItems="Start" justifyContent="Center">
    <l:Grid containerQuery="true" defaultSpan="XL12 L12 M12 S12">
      <Label text=""/>
      <Text text="Hello Kitty"/>
      <Input placeholder="Enter your email address" id="email" type="Email" value="{confirm>/email}" liveChange="onHandleLiveChangeEmail"/>
      <Button type="Accept" enabled="{confirm>/enable}" text="Hello" press=".handlePressAuthorization" width="100%" />
    </l:Grid>
  </FlexBox>
</Page>

Unfortunately, I could not figure out where the differences are except App 1 runs with Flexible Column Layout.

Both apps are hosted on GitHub:

question from:https://stackoverflow.com/questions/65845634/why-are-heights-of-some-ui-components-smaller-than-usual

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

App 1 has sapUiSizeCompact in the class list of <body> (see index.html): https://github.com/softshipper/app1/blob/42e44ca6be14a816a296f04235f08daf0fa1840d/webapp/index.html

App 2 doesn't have it.


For more information and other density options, see topic Content Density from the documentation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...