Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022_223_Digi Bus
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gunasekara M.A.L.M
2022_223_Digi Bus
Commits
089a2f8c
Commit
089a2f8c
authored
Oct 07, 2022
by
Gunasekara M.A.L.M
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement routing
parent
f6bf28f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
155 additions
and
109 deletions
+155
-109
digibus/App.js
digibus/App.js
+155
-109
No files found.
digibus/App.js
View file @
089a2f8c
...
...
@@ -6,9 +6,8 @@
* @flow strict-local
*/
import
React
from
'
react
'
;
import
type
{
Node
}
from
'
react
'
;
import
{
import
React
from
'
react
'
;
import
{
SafeAreaView
,
ScrollView
,
StatusBar
,
...
...
@@ -16,45 +15,28 @@ import {
Text
,
useColorScheme
,
View
,
}
from
'
react-native
'
;
}
from
'
react-native
'
;
import
{
import
{
Colors
,
DebugInstructions
,
Header
,
LearnMoreLinks
,
ReloadInstructions
,
}
from
'
react-native/Libraries/NewAppScreen
'
;
}
from
'
react-native/Libraries/NewAppScreen
'
;
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
* LTI update could not be added via codemod */
const
Section
=
({
children
,
title
}):
Node
=>
{
const
isDarkMode
=
useColorScheme
()
===
'
dark
'
;
return
(
<
View
style
=
{
styles
.
sectionContainer
}
>
<
Text
style
=
{[
styles
.
sectionTitle
,
{
color
:
isDarkMode
?
Colors
.
white
:
Colors
.
black
,
},
]}
>
{
title
}
<
/Text
>
<
Text
style
=
{[
styles
.
sectionDescription
,
{
color
:
isDarkMode
?
Colors
.
light
:
Colors
.
dark
,
},
]}
>
{
children
}
<
/Text
>
<
/View
>
);
};
import
{
Stack
,
Router
,
Scene
,
ActionConst
}
from
'
react-native-router-flux
'
;
import
{
widthPercentageToDP
as
wp
,
heightPercentageToDP
as
hp
}
from
'
react-native-responsive-screen
'
;
const
App
:
()
=>
Node
=
()
=>
{
import
SplashScreen
from
'
./src/screen/splash_screen/splashscreen
'
;
import
HomeScreen
from
'
./src/screen/home_screen/homescreen
'
;
import
BusListScreen
from
'
./src/screen/bus_list_screen/buslistscreen
'
;
import
MapScreen
from
'
./src/screen/map_screen/mapscreen
'
;
import
BusRoteScreen
from
'
./src/screen/bus_route_screen/busroutescreen
'
;
const
App
=
()
=>
{
const
isDarkMode
=
useColorScheme
()
===
'
dark
'
;
const
backgroundStyle
=
{
...
...
@@ -62,40 +44,91 @@ const App: () => Node = () => {
};
return
(
<
SafeAreaView
style
=
{
backgroundStyle
}
>
<
StatusBar
barStyle
=
{
isDarkMode
?
'
light-content
'
:
'
dark-content
'
}
backgroundColor
=
{
backgroundStyle
.
backgroundColor
}
<
Router
>
<
Stack
key
=
"
root
"
headerLayoutPreset
=
"
center
"
>
<
Scene
key
=
"
splash
"
type
=
"
replace
"
component
=
{
SplashScreen
}
initial
hideNavBar
=
{
true
}
/
>
<
ScrollView
contentInsetAdjustmentBehavior
=
"
automatic
"
style
=
{
backgroundStyle
}
>
<
Header
/>
<
View
style
=
{{
backgroundColor
:
isDarkMode
?
Colors
.
black
:
Colors
.
white
,
}}
>
<
Section
title
=
"
Step One
"
>
Edit
<
Text
style
=
{
styles
.
highlight
}
>
App
.
js
<
/Text> to change thi
s
screen
and
then
come
back
to
see
your
edits
.
<
/Section
>
<
Section
title
=
"
See Your Changes
"
>
<
ReloadInstructions
/>
<
/Section
>
<
Section
title
=
"
Debug
"
>
<
DebugInstructions
/>
<
/Section
>
<
Section
title
=
"
Learn More
"
>
Read
the
docs
to
discover
what
to
do
next
:
<
/Section
>
<
LearnMoreLinks
/>
<
Scene
key
=
"
authenticated
"
type
=
"
replace
"
renderTitle
=
{()
=>
(
<
View
style
=
{
styles
.
navBarStyles
}
>
<
View
style
=
{
styles
.
app_logs_holder
}
>
{
/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */
}
<
/View
>
<
/View
>
<
/ScrollView
>
<
/SafeAreaView
>
)}
//hideNavBar={true}
panHandlers
=
{
null
}
>
<
Scene
key
=
"
dashbord
"
title
=
"
Select Route And Bus off
"
component
=
{
HomeScreen
}
renderTitle
=
{()
=>
(
<
View
style
=
{
styles
.
navBarStyles
}
>
<
View
style
=
{
styles
.
app_logs_holder
}
>
{
/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */
}
<
Text
style
=
{{
color
:
'
#000
'
}}
>
Select
Route
And
Bus
off
<
/Text
>
<
/View
>
<
/View
>
)}
hideNavBar
=
{
true
}
initial
/>
<
Scene
key
=
"
busRoute
"
title
=
"
Bus Details
"
component
=
{
BusRoteScreen
}
// renderTitle={() => (
// <View style={styles.navBarStyles}>
// <View style={styles.app_logs_holder}>
// {/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */}
// </View>
// </View>
// )}
hideNavBar
=
{
true
}
/
>
<
Scene
key
=
"
busList
"
title
=
"
Bus Details
"
component
=
{
BusListScreen
}
// renderTitle={() => (
// <View style={styles.navBarStyles}>
// <View style={styles.app_logs_holder}>
// {/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */}
// </View>
// </View>
// )}
hideNavBar
=
{
true
}
/
>
<
Scene
key
=
"
mapScreen
"
title
=
"
View On Map
"
component
=
{
MapScreen
}
// renderTitle={() => (
// <View style={styles.navBarStyles}>
// <View style={styles.app_logs_holder}>
// {/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */}
// </View>
// </View>
// )}
hideNavBar
=
{
true
}
/
>
<
/Scene
>
<
/Stack
>
<
/Router
>
);
};
};
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
sectionContainer
:
{
marginTop
:
32
,
paddingHorizontal
:
24
,
...
...
@@ -112,6 +145,19 @@ const styles = StyleSheet.create({
highlight
:
{
fontWeight
:
'
700
'
,
},
});
navBarStyles
:
{
width
:
"
100%
"
,
//wp('100%')
height
:
hp
(
'
7.5%
'
),
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
},
app_logs_holder
:
{
width
:
wp
(
'
10%
'
),
height
:
hp
(
'
5%
'
),
alignContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
});
export
default
App
;
\ No newline at end of file
export
default
App
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment