Large Title is not shown when opening the screen.
After scrolling up the title becomes visible.
| Screen opened | Scrolled up |
| :-----------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
|
|
|
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, { Component } from "react";
import {
Dimensions,
Platform,
ScrollView,
StyleSheet,
Text,
View
} from "react-native";
const instructions = Platform.select({
ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
android:
"Double tap R on your keyboard to reload,\n" +
"Shake or press menu button for dev menu"
});
type Props = {};
export default class Screen2 extends Component<Props> {
static options(passProps) {
return {
bottomTab: {
text: "Screen 2"
},
topBar: {
title: {
text: "Screen 2"
},
visible: true,
animate: true,
largeTitle: {
visible: true
}
}
};
}
render() {
return (
<ScrollView contentContainerStyle={styles.container}>
<Text style={styles.welcome}>Welcome to React Native!</Text>
<Text style={styles.instructions}>To get started, edit App.js</Text>
<Text style={styles.instructions}>{instructions}</Text>
</ScrollView>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF",
minHeight: Dimensions.get("window").height * 2
},
welcome: {
fontSize: 20,
textAlign: "center",
margin: 10
},
instructions: {
textAlign: "center",
color: "#333333",
marginBottom: 5
}
});
2.2.50.57.8iOSSimulator > DebugNeeded second screen to demonstrate because of https://github.com/wix/react-native-navigation/issues/3429.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
This issue still occurs
This issue it still relevant.
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
+1
Here is a quick workaround.
<ScrollView ref={ref => ref.scrollTo({x: 0, y: -10})}>
or
<ScrollView ref={ref => (this.view = ref)}>
and then in componentDidMount:
componentDidMount() {
If(this.view) {
this.view.scrollTo({ x: 0, y: -10})
}
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
bump
This issue still occurs.
Still happens
+1
Most helpful comment
bump