custom right button problems with positioning on Android.
Issue Description
I am designing my own custom right button which design is like this(What I want to do):

But this is what the result is when I am trying to implement it:

I already follow this and refered to other issues here. I succeed in making gap between the button and the right side on IOS but I can't make it on Android. I wanna make a padding between the button and right side... Please help me and I really appreciate it.
This is code I made:
Navigation.startTabBasedApp({
tabs: [
{
title: 'Screen One',
screen: 'connecting.VoiceTab', // unique ID registered with Navigation.registerScreen
icon: require('../assets/bottom_tab_menu1.png'), // local image asset for the tab icon unselected state (optional on iOS)
selectedIcon: require('../assets/bottom_tab_menu1_on.png'), // local image asset for the tab icon selected state (optional, iOS only. On Android, Use tabBarSelectedButtonColor instead)
iconInsets: defineIconInsets,
title: 'Connecting',
navigatorStyle: defaultNavStyle,
navigatorButtons: {
rightButtons: [
{
id: 'custom-button',
component: 'connecting.PaymentButton',
passProps: {
text: 'Hi!',
},
}
]
}
},
`Import React, { Component } from 'react';
import { Image, TouchableOpacity, StyleSheet, View, Text } from 'react-native';
const styles = StyleSheet.create({ button: { width: 30, height: 20, justifyContent: 'center', alignItems: 'center', }, });
export default PaymentButton = ({ text }) => <TouchableOpacity style={[styles.button]} onPress={() => console.log('pressed me!')}> <Image style={styles.button} source={require('../../assets/big_crown.png')} /> `
Please help me solve the problem...:(
Environment
- React Native Navigation version: latest
- React Native version: latest
- Platform(s) (iOS, Android, or both?): Android
We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.
same me. why close?
width for custom right button too small cause error
same issue here
same issue here +1
Got fix for this, ensure that you set a width on the container of the component you are passing in. I bumped it from 30-50 and all is fine.