fix: BlurView on Android
This commit is contained in:
@@ -108,8 +108,14 @@ export function ColoredBlurView(props: PropsWithChildren<BlurViewProps>) {
|
|||||||
: scheme === 'dark' ? 'extraDark' : 'xlight'
|
: scheme === 'dark' ? 'extraDark' : 'xlight'
|
||||||
} />
|
} />
|
||||||
) : (
|
) : (
|
||||||
<View {...props} style={[ props.style, {
|
<BlurView
|
||||||
backgroundColor: scheme === 'light' ? '#f6f6f6f6' : '#333333f6',
|
{...props}
|
||||||
} ]} />
|
blurType={scheme === 'dark' ? 'dark' : 'light'}
|
||||||
|
blurAmount={10}
|
||||||
|
style={[ props.style, {
|
||||||
|
backgroundColor: scheme === 'light' ? '#f6f6f6bb' : '#333333bb',
|
||||||
|
borderRadius: 8
|
||||||
|
} ]}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useCallback, useEffect, useRef } from 'react';
|
import React, { useCallback, useEffect, useRef } from 'react';
|
||||||
import { ActivityIndicator, Animated, Dimensions, Easing, Pressable, View } from 'react-native';
|
import { ActivityIndicator, Animated, Dimensions, Easing, Platform, Pressable, View } from 'react-native';
|
||||||
import FastImage from 'react-native-fast-image';
|
import FastImage from 'react-native-fast-image';
|
||||||
import styled, { css } from 'styled-components/native';
|
import styled, { css } from 'styled-components/native';
|
||||||
|
|
||||||
@@ -144,11 +144,14 @@ function NowPlaying() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<ShadowOverlay pointerEvents='none'>
|
{/** TODO: Fix shadow overflow on Android */}
|
||||||
<Shadow distance={30} style={{ alignSelf: 'stretch', flexBasis: '100%' }} startColor="#00000017">
|
{Platform.OS === 'ios' ? (
|
||||||
<View style={{ flex: 1, borderRadius: 8 }} />
|
<ShadowOverlay pointerEvents='none'>
|
||||||
</Shadow>
|
<Shadow distance={30} style={{ alignSelf: 'stretch', flexBasis: '100%' }} startColor="#00000017">
|
||||||
</ShadowOverlay>
|
<View style={{ flex: 1, borderRadius: 8 }} />
|
||||||
|
</Shadow>
|
||||||
|
</ShadowOverlay>
|
||||||
|
) : null}
|
||||||
<ColoredBlurView style={{ borderRadius: 8 }}>
|
<ColoredBlurView style={{ borderRadius: 8 }}>
|
||||||
<InnerContainer onPress={openNowPlayingModal} activeOpacity={0.5} testID="open-player-modal">
|
<InnerContainer onPress={openNowPlayingModal} activeOpacity={0.5} testID="open-player-modal">
|
||||||
<ShadowWrapper size="small">
|
<ShadowWrapper size="small">
|
||||||
|
|||||||
Reference in New Issue
Block a user