Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
pill_minder
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phuengton Chummuel
pill_minder
Commits
cc571bdc
Commit
cc571bdc
authored
7 years ago
by
Phuengton Chummuel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change navigation style
parent
749e9400
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
RootNavigator.js
src/navigators/RootNavigator.js
+14
-4
HomeScreen.js
src/screens/HomeScreen.js
+6
-6
ReminderDetail.js
src/screens/ReminderDetail.js
+2
-1
No files found.
src/navigators/RootNavigator.js
View file @
cc571bdc
import
React
,
{
Component
}
from
'react'
;
import
{
DrawerNavigator
,
StackNavigator
}
from
'react-navigation'
;
import
{
DrawerNavigator
,
StackNavigator
,
TabNavigator
}
from
'react-navigation'
;
import
HomeScreen
from
'./../screens/HomeScreen'
;
import
CameraScreen
from
'./../screens/CameraScreen'
;
...
...
@@ -14,7 +14,7 @@ import ReminderDetail from './../screens/ReminderDetail'
const
RootNavigator
=
StackNavigator
(
{
Home
:
{
screen
:
Drawer
Navigator
({
screen
:
Tab
Navigator
({
Home
:
{
screen
:
StackNavigator
({
Home
:
{
...
...
@@ -54,6 +54,18 @@ const RootNavigator = StackNavigator(
headerMode
:
'none'
})
}
},
{
tabBarPosition
:
'bottom'
,
swipeEnabled
:
false
,
tabBarOptions
:
{
labelStyle
:
{
color
:
'black'
},
style
:
{
backgroundColor
:
'white'
,
}
}
})
},
SignIn
:
{
...
...
@@ -64,5 +76,4 @@ const RootNavigator = StackNavigator(
}
)
export
default
RootNavigator
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/screens/HomeScreen.js
View file @
cc571bdc
...
...
@@ -67,7 +67,7 @@ class HomeScreen extends Component {
<
Grid
>
<
Col
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
morningReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
morningReminder
,
1
)}
>
<
ReminderList
periodText
=
{
"Morning"
}
items
=
{
this
.
state
.
morningReminder
}
...
...
@@ -75,7 +75,7 @@ class HomeScreen extends Component {
<
/TouchableOpacity
>
<
/Row
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
afternoonReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
afternoonReminder
,
2
)}
>
<
ReminderList
periodText
=
{
"Afternoon"
}
items
=
{
this
.
state
.
afternoonReminder
}
...
...
@@ -85,7 +85,7 @@ class HomeScreen extends Component {
<
/Col
>
<
Col
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
eveningReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
eveningReminder
,
3
)}
>
<
ReminderList
periodText
=
{
"Evening"
}
items
=
{
this
.
state
.
eveningReminder
}
...
...
@@ -93,7 +93,7 @@ class HomeScreen extends Component {
<
/TouchableOpacity
>
<
/Row
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
nightReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
nightReminder
,
4
)}
>
<
ReminderList
periodText
=
{
"Night"
}
items
=
{
this
.
state
.
nightReminder
}
...
...
@@ -124,9 +124,9 @@ class HomeScreen extends Component {
this
.
props
.
navigation
.
navigate
(
'DrawerToggle'
);
}
_timePeriodPress
(
data
)
{
_timePeriodPress
(
data
,
period
)
{
ToastAndroid
.
show
(
JSON
.
stringify
(
data
),
ToastAndroid
.
SHORT
)
this
.
props
.
navigation
.
navigate
(
'Detail'
,
{
items
:
data
})
this
.
props
.
navigation
.
navigate
(
'Detail'
,
{
items
:
data
,
period
:
period
})
}
_queryReminder
()
{
...
...
This diff is collapsed.
Click to expand it.
src/screens/ReminderDetail.js
View file @
cc571bdc
...
...
@@ -19,13 +19,14 @@ class ReminderDetail extends React.Component {
const
{
params
}
=
this
.
props
.
navigation
.
state
;
const
{
goBack
}
=
this
.
props
.
navigation
;
const
items
=
params
?
params
.
items
:
null
const
period
=
params
.
period
==
1
?
"Mornign"
:
params
.
period
==
2
?
"Afternoon"
:
params
.
period
==
3
?
"Evening"
:
"Night"
const
{
headerStyle
,
headerFontStyle
}
=
styles
return
(
<
Container
style
=
{{
backgroundColor
:
'white'
}}
>
<
AppHeader
headerText
=
{
"Morning"
}
headerText
=
{
period
}
headerLeft
=
{
<
Button
onPress
=
{()
=>
goBack
()}
>
<
Icon
name
=
'arrow-back'
/>
...
...
This diff is collapsed.
Click to expand it.
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