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
Hide 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,112 +6,158 @@
...
@@ -6,112 +6,158 @@
* @flow strict-local
* @flow strict-local
*/
*/
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
Node
}
from
'
react
'
;
import
{
import
{
SafeAreaView
,
SafeAreaView
,
ScrollView
,
ScrollView
,
StatusBar
,
StatusBar
,
StyleSheet
,
StyleSheet
,
Text
,
Text
,
useColorScheme
,
useColorScheme
,
View
,
View
,
}
from
'
react-native
'
;
}
from
'
react-native
'
;
import
{
import
{
Colors
,
Colors
,
DebugInstructions
,
DebugInstructions
,
Header
,
Header
,
LearnMoreLinks
,
LearnMoreLinks
,
ReloadInstructions
,
ReloadInstructions
,
}
from
'
react-native/Libraries/NewAppScreen
'
;
}
from
'
react-native/Libraries/NewAppScreen
'
;
import
{
Stack
,
Router
,
Scene
,
ActionConst
}
from
'
react-native-router-flux
'
;
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
import
{
widthPercentageToDP
as
wp
,
heightPercentageToDP
as
hp
}
from
'
react-native-responsive-screen
'
;
* LTI update could not be added via codemod */
const
Section
=
({
children
,
title
}):
Node
=>
{
const
isDarkMode
=
useColorScheme
()
===
'
dark
'
;
import
SplashScreen
from
'
./src/screen/splash_screen/splashscreen
'
;
return
(
import
HomeScreen
from
'
./src/screen/home_screen/homescreen
'
;
<
View
style
=
{
styles
.
sectionContainer
}
>
import
BusListScreen
from
'
./src/screen/bus_list_screen/buslistscreen
'
;
<
Text
import
MapScreen
from
'
./src/screen/map_screen/mapscreen
'
;
style
=
{[
import
BusRoteScreen
from
'
./src/screen/bus_route_screen/busroutescreen
'
;
styles
.
sectionTitle
,
{
color
:
isDarkMode
?
Colors
.
white
:
Colors
.
black
,
const
App
=
()
=>
{
},
const
isDarkMode
=
useColorScheme
()
===
'
dark
'
;
]}
>
{
title
}
const
backgroundStyle
=
{
<
/Text
>
backgroundColor
:
isDarkMode
?
Colors
.
darker
:
Colors
.
lighter
,
<
Text
};
style
=
{[
styles
.
sectionDescription
,
return
(
{
<
Router
>
color
:
isDarkMode
?
Colors
.
light
:
Colors
.
dark
,
<
Stack
key
=
"
root
"
headerLayoutPreset
=
"
center
"
>
},
<
Scene
]}
>
key
=
"
splash
"
{
children
}
type
=
"
replace
"
<
/Text
>
component
=
{
SplashScreen
}
<
/View
>
initial
);
hideNavBar
=
{
true
}
};
/
>
const
App
:
()
=>
Node
=
()
=>
{
<
Scene
const
isDarkMode
=
useColorScheme
()
===
'
dark
'
;
key
=
"
authenticated
"
type
=
"
replace
"
const
backgroundStyle
=
{
renderTitle
=
{()
=>
(
backgroundColor
:
isDarkMode
?
Colors
.
darker
:
Colors
.
lighter
,
<
View
style
=
{
styles
.
navBarStyles
}
>
};
<
View
style
=
{
styles
.
app_logs_holder
}
>
{
/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */
}
return
(
<
/View
>
<
SafeAreaView
style
=
{
backgroundStyle
}
>
<
/View
>
<
StatusBar
)}
barStyle
=
{
isDarkMode
?
'
light-content
'
:
'
dark-content
'
}
//hideNavBar={true}
backgroundColor
=
{
backgroundStyle
.
backgroundColor
}
panHandlers
=
{
null
}
/
>
>
<
ScrollView
<
Scene
contentInsetAdjustmentBehavior
=
"
automatic
"
key
=
"
dashbord
"
style
=
{
backgroundStyle
}
>
title
=
"
Select Route And Bus off
"
<
Header
/>
component
=
{
HomeScreen
}
<
View
renderTitle
=
{()
=>
(
style
=
{{
<
View
style
=
{
styles
.
navBarStyles
}
>
backgroundColor
:
isDarkMode
?
Colors
.
black
:
Colors
.
white
,
<
View
style
=
{
styles
.
app_logs_holder
}
>
}}
>
{
/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */
}
<
Section
title
=
"
Step One
"
>
<
Text
style
=
{{
color
:
'
#000
'
}}
>
Select
Route
And
Bus
off
<
/Text
>
Edit
<
Text
style
=
{
styles
.
highlight
}
>
App
.
js
<
/Text> to change thi
s
<
/View
>
screen
and
then
come
back
to
see
your
edits
.
<
/View
>
<
/Section
>
)}
<
Section
title
=
"
See Your Changes
"
>
hideNavBar
=
{
true
}
<
ReloadInstructions
/>
initial
<
/Section
>
/>
<
Section
title
=
"
Debug
"
>
<
Scene
<
DebugInstructions
/>
key
=
"
busRoute
"
<
/Section
>
title
=
"
Bus Details
"
<
Section
title
=
"
Learn More
"
>
component
=
{
BusRoteScreen
}
Read
the
docs
to
discover
what
to
do
next
:
// renderTitle={() => (
<
/Section
>
// <View style={styles.navBarStyles}>
<
LearnMoreLinks
/>
// <View style={styles.app_logs_holder}>
<
/View
>
// {/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */}
<
/ScrollView
>
// </View>
<
/SafeAreaView
>
// </View>
);
// )}
};
hideNavBar
=
{
true
}
/
>
const
styles
=
StyleSheet
.
create
({
<
Scene
sectionContainer
:
{
key
=
"
busList
"
marginTop
:
32
,
title
=
"
Bus Details
"
paddingHorizontal
:
24
,
component
=
{
BusListScreen
}
},
// renderTitle={() => (
sectionTitle
:
{
// <View style={styles.navBarStyles}>
fontSize
:
24
,
// <View style={styles.app_logs_holder}>
fontWeight
:
'
600
'
,
// {/* <Image source={{ uri: 'tabbar_icon' }} style={styles.app_logs} /> */}
},
// </View>
sectionDescription
:
{
// </View>
marginTop
:
8
,
// )}
fontSize
:
18
,
hideNavBar
=
{
true
}
fontWeight
:
'
400
'
,
/
>
},
<
Scene
highlight
:
{
key
=
"
mapScreen
"
fontWeight
:
'
700
'
,
title
=
"
View On Map
"
},
component
=
{
MapScreen
}
});
// renderTitle={() => (
// <View style={styles.navBarStyles}>
export
default
App
;
// <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
({
sectionContainer
:
{
marginTop
:
32
,
paddingHorizontal
:
24
,
},
sectionTitle
:
{
fontSize
:
24
,
fontWeight
:
'
600
'
,
},
sectionDescription
:
{
marginTop
:
8
,
fontSize
:
18
,
fontWeight
:
'
400
'
,
},
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
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