【问题标题】:ionic 3 angular different UI on android and iosandroid 和 ios 上的 ionic 3 角度不同的 UI
【发布时间】:2017-08-08 22:32:57
【问题描述】:

我正在使用 ionic 3 angular 并使用 ion-scroll 来放置一个呈现一些按钮的水平可滚动区域。代码看起来像

<ion-scroll scrollX="true" style="width:100vw;height:49px">
            <ion-row nowrap >
            <button *ngFor="let item of messageQueue.shortcutList" ion-button small round (click)="processShortcut(item.action)">{{item.action}}</button>
            </ion-row>
        </ion-scroll>

这在 ios 上看起来很完美,但在 android 上呈现的按钮大小是固定的,因此文本会被剪切。

请看截图https://www.dropbox.com/s/0amwir62acliccn/Screenshot%202017-08-08%2015.32.21.png?dl=0

【问题讨论】:

  • 图片好像不行,可以上传到imgur
  • 现在试试,它应该可以工作
  • 我没有使用 Ionic 但是,溢出似乎在 android 上被禁用,也许如果你用 css overflow: auto 启用它,它就会在 ios 和 android ui 上工作。

标签: android css angular ionic3


【解决方案1】:

不确定您是否想要这样,但如果您不希望应用程序具有每个设备的本机外观,您可以将应用程序设置为默认值。

imports: [
    IonicModule.forRoot(MyApp,{
        mode: 'md'
    })
],

在这种情况下,它默认为材质外观。

【讨论】:

  • 这是我搜索的解决方案。还向@Vik +1 询问相关问题。
猜你喜欢
  • 1970-01-01
  • 2017-12-31
  • 2019-05-24
  • 2023-04-04
  • 2017-11-21
  • 1970-01-01
  • 2019-09-08
  • 1970-01-01
  • 2020-09-13
相关资源
最近更新 更多