React-native-navigation: Change specific bottom icon size (scale)

Created on 28 Dec 2019  路  3Comments  路  Source: wix/react-native-navigation

Issue Description

I have 5 bottom icon and i want to resize one of them
This is exactly my problem btw,
https://github.com/wix/react-native-navigation/issues/5115#issue-444692721

Steps to Reproduce / Code Snippets / Screenshots

i can change all icon size in dimens.xml with
<dimen name="bottom_navigation_icon">30dp</dimen>
But, I just want to change the size of 2. icon index.

In ios everything just looking fine with scale: 2.5

Also, i searched this problem in https://github.com/aurelhubert/ahbottomnavigation but no luck so far.

My code like this, tab_icon.png in drawable folder and looking fine except size and position of this icon

bottomTab: { visible: true, selectedIconColor: null, iconColor: null, icon: { scale: 2.5, uri: 'tab_icon', }, selectedIcon: { scale: 2.5, uri: 'tab_icon_active', }, }

I also tried to do it with xml file like:

<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:name="android:layout_height" android:height="60dp" android:width="60dp" android:drawable="@drawable/tab_icon">60dp</item> </selector>

is there any way to achieve this? can u help me with it? any workaround excepted too.


Environment

  • React Native Navigation version: ^4.0.9
  • React Native version: 0.61.5
  • Platform(s) (iOS, Android, or both?): Android
馃彋 stale

Most helpful comment

Just ran into the same ish issue, however, just to clarify, to increase the size of all icons, add:

<?xml version="1.0" encoding="utf-8"?>
 <resources>
    <dimen name="bottom_navigation_icon">30dp</dimen>
 </resources>

To ./android/app/src/main/res/values/dimen.xml

If your icons still arent matching up, save some of them with some extra white space around them 馃憤

All 3 comments

Just ran into the same ish issue, however, just to clarify, to increase the size of all icons, add:

<?xml version="1.0" encoding="utf-8"?>
 <resources>
    <dimen name="bottom_navigation_icon">30dp</dimen>
 </resources>

To ./android/app/src/main/res/values/dimen.xml

If your icons still arent matching up, save some of them with some extra white space around them 馃憤

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

The issue has been closed for inactivity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EliSadaka picture EliSadaka  路  3Comments

viper4595 picture viper4595  路  3Comments

birkir picture birkir  路  3Comments

ghost picture ghost  路  3Comments

yayanartha picture yayanartha  路  3Comments