Skip to content

[android]weird border with borderRadius in huawei and meizu #16833

@toearth

Description

@toearth

Is this a bug report?

yes

Have you read the Contributing Guidelines?

(Write your answer here.)

Environment

Steps to Reproduce

(Write your steps here:)

When set the border color to #329CF8. and another action reset boder color to #F2F2F2, then #329CF8 color dose not disappear. This problem can find in huawei honor and meizu. In samsung, the behavior is normal. If remove borderRadius , all became normal.

set blue border
b47a5169-d47e-4afb-97aa-0e96f30be226

set grey border
c293f082-2e9b-486e-a247-5060f547d9aa

    render() {
        return (
            <TouchableOpacity
                style={[styles.container, this.state.hasBorder ? styles.tagContainer :styles.tagContainerGrey]}
                onPress={this.onPress}>
                <Text style={[styles.text, this.state.hasBorder ? styles.tagText : styles.tagTextGrey]}>
                    test1
                </Text>
            </TouchableOpacity>
        )
    }


let styles = StyleSheet.create({
    container: {
        height: 20,
        width: 47,
        alignItems: 'center',
        justifyContent: 'center',
    },
    text: {
        fontSize: 13,
        paddingBottom: 0.2
    },
    tagContainerGrey: {
        borderColor: '#F2F2F2',
        backgroundColor: '#F2F2F2',
        width: 75,
        height: 35,
        marginRight: 10,
        borderRadius: 7,
    },
    tagTextGrey: {
        color: '#3B3B3B',
    },
    tagContainer: {
        backgroundColor: 'white',
        width: 75,
        height: 35,
        marginRight: 10,
        borderRadius: 7,
        borderWidth: 1 / PixelRatio.get(),
        borderColor: '#329CF8',
    },
    tagText: {
        fontSize: 13,
        color: '#329CF8',
    },
})

Expected Behavior

33e61011-c757-498d-9503-0304799f3333

(Write what you thought would happen.)

Actual Behavior

c293f082-2e9b-486e-a247-5060f547d9aa

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions