Android 6 及以下版本不显示离子标签图标 [英] Ionic Tab Icons not showing for Android 6 and Below

查看:36
本文介绍了Android 6 及以下版本不显示离子标签图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个带有图标的离子标签.Android 7 及更高版本的图标可以正确显示,但在 Android 6 以下,很少有图标没有显示.下面是相同的屏幕截图.我正在使用 ionic 5 和电容版本 2.1.2

I have a created ionic tabs with icons. Icons are correctly displayed for Android 7 and above, But below Android 6, few icons are not getting displayed. Below is the screenshot for the same. I am using ionic 5 and capacitor version 2.1.2

我尝试重新排序和列出.这两个图标在 android 6 以下都没有显示.在 android 7 以上它可以工作.

i tried with reorder and list. Both these icons are not shown for below android 6. Above android 7 it works.

我错过了什么吗?

Android 6 截图:

Android 6 screenshot :

Android 7 及更高版本

Android 7 and above

标签代码:

    <ion-tabs>
      <ion-tab-bar slot="bottom">
        <ion-tab-button tab="tab1">
         <!-- <ion-icon name="pricetag-outline"></ion-icon>-->
         <ion-icon name="pricetag"></ion-icon>
        </ion-tab-button>
    
 /*Using the SVG locally, still doesn't display for android 6 and below. Works fine for Android 7 and above.*/ 
        <ion-tab-button tab="tab2">
         <!-- <ion-icon name="reorder-four-outline"></ion-icon>-->
         <ion-icon class="staticIcon" src="/assets/icon/list.svg" ></ion-icon>
        </ion-tab-button>
    
        <ion-tab-button tab="tab3">
         <!-- <ion-icon name="location-outline"></ion-icon>-->
         <ion-icon name="location"></ion-icon>
        </ion-tab-button>
    
        <ion-tab-button tab="tab4">
         <!-- <ion-icon name="person-outline"></ion-icon>-->
         <ion-icon name="person"></ion-icon>
        </ion-tab-button>
      </ion-tab-bar>
    </ion-tabs>

推荐答案

试试这个:

<object type="image/svg+xml" data="/assets/icon/list.svg">
  Your browser does not support SVG
</object>

这篇关于Android 6 及以下版本不显示离子标签图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆