Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not swiping correctly (Android) #16

Open
ilbertt opened this issue Jun 30, 2021 · 1 comment
Open

Image not swiping correctly (Android) #16

ilbertt opened this issue Jun 30, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ilbertt
Copy link

ilbertt commented Jun 30, 2021

Swiping on a real device running Android 8.0.0 has this effect:
doc-2021-06-30-17-28-35

On a real device running iOS, it works correctly.
On an emulator running Android 11, it works correctly.

The SwipeCards component is configured pretty much like the example, with stack option as you can see.

Here is the card component:

import React from 'react';
import { Image, StyleSheet, Dimensions, View, Text } from 'react-native';

import { ProductModel } from '../models/product';

interface ProductCardProps {
    product: ProductModel;
};

const ProductCard: React.FC<ProductCardProps> = (props: ProductCardProps) => {
    const { product } = props;

    return (
        <View style={styles.card}>
            <Image style={styles.cardImage} source={{ uri: product.imageUrl }} />
            <View style={styles.info}>
                <Text>{product.title}</Text>
                <Text>{product.price.toFixed(2)}</Text>
            </View>
        </View>
    );
};

const styles = StyleSheet.create({
    card: {
        width: Dimensions.get('window').width - 30,
        height: '100%',
        borderWidth: 1,
        borderRadius: 20,
        borderColor: '#ccc',
        overflow: 'hidden',
        backgroundColor: 'white',
        // shadowColor: '#333',
        // shadowOffset: { width: 0, height: 2 },
        // shadowRadius: 10,
        // shadowOpacity: 0.5,
        // elevation: 7,
    },
    cardImage: {
        width: '100%',
        height: '80%',
    },
    info: {
        padding: 10,
        justifyContent: 'center',
        alignItems: 'center',
    }
});

export default ProductCard;

Where is the problem?
(Please note also the staked cards behind, which are rendered badly in my opinion.)

@eyalabs eyalabs added the bug Something isn't working label Jul 12, 2021
@eyalabs eyalabs self-assigned this Jul 12, 2021
@eyalabs
Copy link

eyalabs commented Sep 29, 2021

I can reproduce this on android 8 device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants