Skip to content

MaskedView with LinearGradient not working on Android #235

@bhavesh-trentium

Description

@bhavesh-trentium

I am using a MaskedView and LinearGradient. To create a GradientText its working well on iOS but on a Android not.
On an Android, it shows a Red Color Background.
Not sure but it's an issue created MaskedView Related. MaskedView is not working on Android.

import { LinearGradient } from 'expo-linear-gradient';
import MaskedView from '@react-native-masked-view/masked-view';

 <MaskedView maskElement={<Text style={style}>{text}</Text>}>
      <LinearGradient
        start={{ x: 0, y: 0 }}
        end={{ x: 1, y: 1 }}
        colors={textColor}>
        <Text style={[style, { opacity: 0 }]}>{text}</Text>
      </LinearGradient>
    </MaskedView>
  "react-native": "0.72.6",
  "expo": "^49.0.21",
  "expo-linear-gradient": "~12.3.0",
  "@react-native-masked-view/masked-view": "0.2.9",

ANDROID

screenshot_2024-11-14-16-27-15-433_io smatchit app_720

iOS

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions