NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Android View loosing styles

Open gsdias opened this issue 9 years ago • 17 comments

"native-base": "^2.0.8",
"react": "15.4.2",
"react-native": "0.41.2",

When using View from nativa-base and combining the styles borderRadius and borderWidth/borderColor the border color/width is not rendered, android only.

<View style={{ borderRadius: 10, borderWidth: 1, borderColor: 'white' }} />

If I use View from react-native works fine.

gsdias avatar Feb 26 '17 04:02 gsdias

Same problem here.

In my case I am using an Input inside an Item and I'm setting a custom style:

errorItemStyle: { flex: 1, margin: 5, borderRadius: 5, backgroundColor: '#ffeeee', height: 40, borderWidth: 1, borderColor: '#ff0a13' }

On iOS is working fine, but on Android the border is not shown.

I have also tried to set borderTopWidth, borderRightWidth ... But still doesn't work.

Any suggestion? Thanks in advance.

davidbalivo avatar Feb 27 '17 15:02 davidbalivo

Yes, I'm facing the same problem too. Any workarounds?

samanthacampisi avatar Feb 27 '17 16:02 samanthacampisi

@davidbq @samanthacampisi @gsdias Hello! we've played around with NativeBase as well. And, we have suffered the same issues

adityasaxena avatar Feb 28 '17 08:02 adityasaxena

@davidbq @samanthacampisi @adityasaxena We are experiencing the same issues here!

breogangf avatar Feb 28 '17 08:02 breogangf

@gsdias @davidbq @samanthacampisi @adityasaxena @breogangf We are looking into it. Hope to have a working fix today.

sanketsahu avatar Feb 28 '17 08:02 sanketsahu

Thank you @sanketsahusoft, if you need me to test anything or help, just ask ;-)

breogangf avatar Feb 28 '17 08:02 breogangf

Can anybody check if it works with 2.0.11? Make sure to uninstall-native base and then install it again.

sankhadeeproy007 avatar Feb 28 '17 15:02 sankhadeeproy007

It is working now with version 2.0.11!!!!! Thanks a lot!!!

davidbalivo avatar Mar 01 '17 09:03 davidbalivo

Actually, I've spoken too fast. It is working for Android now, but it has a weird behavior on iOS, It only shows the bottom border, this is what I get: screen shot 2017-03-01 at 11 03 02 And this is the Android one which is working perfectly: screen shot 2017-03-01 at 11 04 31

davidbalivo avatar Mar 01 '17 10:03 davidbalivo

Can you confirm that this is the case just for input? Is it similar to #582?

sankhadeeproy007 avatar Mar 01 '17 10:03 sankhadeeproy007

I have just tried to set a border to a button and an image and it works fine for both Android and iOS.

Regarding to #582, in my case I am not using <Form>, I have something like this:

<View>
    <Item style={errorItemStyle}>
        <Input style={inputTextStyle}/>
    </Item>
</View>
errorItemStyle: {
    flex: 1,
    margin: 5,
    borderRadius: 5,
    backgroundColor: '#ffeeee',
    height: 40,
    borderWidth: 1,
    borderColor: '#ff0a13'
},
inputTextStyle: {
    paddingLeft: 10,
    paddingBottom: 10,
    paddingRight: 10
}

davidbalivo avatar Mar 01 '17 10:03 davidbalivo

It's related to Item I guess then

sankhadeeproy007 avatar Mar 01 '17 12:03 sankhadeeproy007

Yes, it seems like. That's why I added my "itemStyle" on my first post, because it is where I set the border.

davidbalivo avatar Mar 01 '17 12:03 davidbalivo

Okay, will look into it.

sankhadeeproy007 avatar Mar 01 '17 12:03 sankhadeeproy007

Do we have any news about this?

breogangf avatar Mar 06 '17 13:03 breogangf

I just realised this is rendering wrongly only on the emulator. On real devices is working for both Android and iOS

davidbalivo avatar Mar 08 '17 08:03 davidbalivo

Fixed in v2.1.3

shivrajkumar avatar Apr 27 '17 10:04 shivrajkumar