-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement search stack screen independent of tabbar
- Loading branch information
Ujjal Acharya
committed
May 5, 2020
1 parent
b1ed829
commit 8575656
Showing
3 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
import React, { Component } from "react"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createStackNavigator } from "@react-navigation/stack"; | ||
|
||
const Stack = createStackNavigator(); | ||
|
||
import TabNavigators from "./TabNavigators"; | ||
import SearchScreen from "../screens/AfterGo/SearchScreen"; | ||
|
||
export default function App() { | ||
return ( | ||
<NavigationContainer> | ||
<TabNavigators/> | ||
<NavigationContainer headerMode="none"> | ||
<Stack.Navigator | ||
screenOptions={{ | ||
headerShown: false, | ||
}} | ||
> | ||
<Stack.Screen name="Root" component={TabNavigators} /> | ||
<Stack.Screen name="Search" component={SearchScreen} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React, { Component } from "react"; | ||
import { Text, View } from "react-native"; | ||
import { Appbar } from "react-native-paper"; | ||
|
||
export class SearchScreen extends Component { | ||
_goBack = () => { | ||
this.props.navigation.pop(); | ||
}; | ||
render() { | ||
return ( | ||
<View> | ||
<Appbar.Header> | ||
<Appbar.BackAction onPress={this._goBack} /> | ||
<Appbar.Content title="Search" /> | ||
</Appbar.Header> | ||
<Text> Search Screen </Text> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
export default SearchScreen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters