@@ -2,6 +2,8 @@ import {useFocusEffect} from "@react-navigation/native"
22import { useCallback , useEffect , useRef } from "react"
33import { Platform , ScrollView , View } from "react-native"
44import { useSharedValue } from "react-native-reanimated"
5+ import { LinearGradient } from "expo-linear-gradient"
6+ import MaskedView from "@react-native-masked-view/masked-view"
57
68import { MentraLogoStandalone } from "@/components/brands/MentraLogoStandalone"
79import { CustomBackground } from "@/components/home/CustomBackground"
@@ -99,7 +101,30 @@ export default function Homepage() {
99101
100102 const renderTopPadding = ( ) => {
101103 if ( Platform . OS === "android" && ! androidBlur ) {
102- return < View style = { { paddingTop : insets . top } } />
104+ return null
105+ }
106+ if ( Platform . OS === "android" ) {
107+ return (
108+ < MaskedView
109+ style = { { position : "absolute" , left : 0 , right : 0 , top : 0 , height : insets . top * 2 , zIndex : 10 , pointerEvents : "none" } }
110+ maskElement = {
111+ < LinearGradient
112+ colors = { [ "black" , "transparent" ] }
113+ locations = { [ 0.4 , 1 ] }
114+ start = { { x : 0 , y : 0 } }
115+ end = { { x : 0 , y : 1 } }
116+ style = { { position : "absolute" , left : 0 , right : 0 , top : 0 , bottom : 0 } }
117+ pointerEvents = "none"
118+ />
119+ } >
120+ < BlurView
121+ intensity = { 20 }
122+ className = "absolute inset-0"
123+ blurTarget = { blurTargetRef }
124+ blurMethod = "dimezisBlurViewSdk31Plus"
125+ />
126+ </ MaskedView >
127+ )
103128 }
104129 return (
105130 < BlurView
@@ -149,6 +174,7 @@ export default function Homepage() {
149174 contentContainerStyle = { { flexGrow : 1 } }
150175 scrollEventThrottle = { 16 } >
151176 { appSwitcherUi && Platform . OS === "android" && androidBlur && < View style = { { paddingTop : insets . top } } /> }
177+ { appSwitcherUi && Platform . OS === "android" && ! androidBlur && < View style = { { paddingTop : insets . top } } /> }
152178 < View className = "h-4" />
153179 { renderContent ( ) }
154180 < View className = "h-4" />
0 commit comments