Android 6及以下版本无法显示Ionic标签图标 [英] Ionic Tab Icons not showing for Android 6 and Below
本文介绍了Android 6及以下版本无法显示Ionic标签图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了带有图标的离子选项卡.适用于Android 7及更高版本的图标可以正确显示,但是低于Android 6的图标则无法显示.下面是相同的屏幕截图. 我正在使用离子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及以下版本无法显示Ionic标签图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文