Transparent header in android
Closed this issue · 7 comments
They is no example for Android devices, on collapse the header becomes transparent and my header title shows.
i noticed in your example you used iOSCollapsedColor, what do we use for android??
Hi, iOSCollapsedColor
is for iOS.
You don't need it because you probably have an opaque status bar on Android unless you use expo
and the header will be just hidden to the top.
You can run this on the Android simulator. (It's expo)
Expo Snack
There is the example folder in this repo and it works on Android as well. (It's react-native init)
Example
I'm not using expo, i use create-react-native-app,
In your case, you should use example for Expo.
But only difference is adding this line on your app.js
or not.
/* Support Expo */
import { setExpoStatusBarHeight } from 'react-navigation-collapsible';
import { Constants } from 'expo';
setExpoStatusBarHeight(Constants.statusBarHeight);
This lines are for Expo
or create-react-native-app
.
I'm confuse, i'm not using expo and am not sure if i can import constant from export since am using create-react-native-app
Actually, create-react-native-app
is one of the ways you use Expo.
I believe you could find Expo dependency on your package.json
.
Okay thanks, i feel i gave the wrong impression, i meant react-native init instead of create-react-native-app
Oh, then you can use this example.
There is the example folder in this repo and it works on Android as well. (It's react-native init)
Example