mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 22:47:02 +08:00
@@ -32,14 +32,17 @@ class Card extends React.Component {
|
||||
scene: { index, isActive },
|
||||
} = this.props;
|
||||
|
||||
const active =
|
||||
transparent || isActive
|
||||
? 1
|
||||
: position.interpolate({
|
||||
inputRange: [index, index + 1 - EPS, index + 1],
|
||||
outputRange: [1, 1, 0],
|
||||
extrapolate: 'clamp',
|
||||
});
|
||||
const active = Platform.select({
|
||||
web: isActive,
|
||||
default:
|
||||
transparent || isActive
|
||||
? 1
|
||||
: position.interpolate({
|
||||
inputRange: [index, index + 1 - EPS, index + 1],
|
||||
outputRange: [1, 1, 0],
|
||||
extrapolate: 'clamp',
|
||||
}),
|
||||
});
|
||||
|
||||
// animatedStyle can be `false` if there is no screen interpolator
|
||||
const animatedStyle = this.props.animatedStyle || {};
|
||||
|
||||
@@ -666,9 +666,11 @@ class StackViewLayout extends React.Component {
|
||||
if (this.props.headerMode) {
|
||||
return this.props.headerMode;
|
||||
}
|
||||
if (Platform.OS !== 'ios' || this.props.mode === 'modal') {
|
||||
if (Platform.OS === 'android' || this.props.mode === 'modal') {
|
||||
return 'screen';
|
||||
}
|
||||
// On web, the float header mode will enable body scrolling and stick the header
|
||||
// to the top of the URL bar when it shrinks and expands.
|
||||
return 'float';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user