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
Feb 07, 2018
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
React
,
{
Component
}
from
'react'
;
import
{
DrawerNavigator
,
StackNavigator
}
from
'react-navigation'
;
import
{
DrawerNavigator
,
StackNavigator
,
TabNavigator
}
from
'react-navigation'
;
import
HomeScreen
from
'./../screens/HomeScreen'
;
import
HomeScreen
from
'./../screens/HomeScreen'
;
import
CameraScreen
from
'./../screens/CameraScreen'
;
import
CameraScreen
from
'./../screens/CameraScreen'
;
...
@@ -14,7 +14,7 @@ import ReminderDetail from './../screens/ReminderDetail'
...
@@ -14,7 +14,7 @@ import ReminderDetail from './../screens/ReminderDetail'
const
RootNavigator
=
StackNavigator
(
const
RootNavigator
=
StackNavigator
(
{
{
Home
:
{
Home
:
{
screen
:
Drawer
Navigator
({
screen
:
Tab
Navigator
({
Home
:
{
Home
:
{
screen
:
StackNavigator
({
screen
:
StackNavigator
({
Home
:
{
Home
:
{
...
@@ -54,6 +54,18 @@ const RootNavigator = StackNavigator(
...
@@ -54,6 +54,18 @@ const RootNavigator = StackNavigator(
headerMode
:
'none'
headerMode
:
'none'
})
})
}
}
},
{
tabBarPosition
:
'bottom'
,
swipeEnabled
:
false
,
tabBarOptions
:
{
labelStyle
:
{
color
:
'black'
},
style
:
{
backgroundColor
:
'white'
,
}
}
})
})
},
},
SignIn
:
{
SignIn
:
{
...
@@ -64,5 +76,4 @@ const RootNavigator = StackNavigator(
...
@@ -64,5 +76,4 @@ const RootNavigator = StackNavigator(
}
}
)
)
export
default
RootNavigator
;
export
default
RootNavigator
;
\ No newline at end of file
src/screens/HomeScreen.js
View file @
cc571bdc
...
@@ -67,7 +67,7 @@ class HomeScreen extends Component {
...
@@ -67,7 +67,7 @@ class HomeScreen extends Component {
<
Grid
>
<
Grid
>
<
Col
>
<
Col
>
<
Row
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
morningReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
morningReminder
,
1
)}
>
<
ReminderList
<
ReminderList
periodText
=
{
"Morning"
}
periodText
=
{
"Morning"
}
items
=
{
this
.
state
.
morningReminder
}
items
=
{
this
.
state
.
morningReminder
}
...
@@ -75,7 +75,7 @@ class HomeScreen extends Component {
...
@@ -75,7 +75,7 @@ class HomeScreen extends Component {
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
afternoonReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodLeftStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
afternoonReminder
,
2
)}
>
<
ReminderList
<
ReminderList
periodText
=
{
"Afternoon"
}
periodText
=
{
"Afternoon"
}
items
=
{
this
.
state
.
afternoonReminder
}
items
=
{
this
.
state
.
afternoonReminder
}
...
@@ -85,7 +85,7 @@ class HomeScreen extends Component {
...
@@ -85,7 +85,7 @@ class HomeScreen extends Component {
<
/Col
>
<
/Col
>
<
Col
>
<
Col
>
<
Row
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
eveningReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
eveningReminder
,
3
)}
>
<
ReminderList
<
ReminderList
periodText
=
{
"Evening"
}
periodText
=
{
"Evening"
}
items
=
{
this
.
state
.
eveningReminder
}
items
=
{
this
.
state
.
eveningReminder
}
...
@@ -93,7 +93,7 @@ class HomeScreen extends Component {
...
@@ -93,7 +93,7 @@ class HomeScreen extends Component {
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/Row
>
<
/Row
>
<
Row
>
<
Row
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
nightReminder
)}
>
<
TouchableOpacity
style
=
{
timePeriodRightStyle
}
onPress
=
{()
=>
this
.
_timePeriodPress
(
this
.
state
.
nightReminder
,
4
)}
>
<
ReminderList
<
ReminderList
periodText
=
{
"Night"
}
periodText
=
{
"Night"
}
items
=
{
this
.
state
.
nightReminder
}
items
=
{
this
.
state
.
nightReminder
}
...
@@ -124,9 +124,9 @@ class HomeScreen extends Component {
...
@@ -124,9 +124,9 @@ class HomeScreen extends Component {
this
.
props
.
navigation
.
navigate
(
'DrawerToggle'
);
this
.
props
.
navigation
.
navigate
(
'DrawerToggle'
);
}
}
_timePeriodPress
(
data
)
{
_timePeriodPress
(
data
,
period
)
{
ToastAndroid
.
show
(
JSON
.
stringify
(
data
),
ToastAndroid
.
SHORT
)
ToastAndroid
.
show
(
JSON
.
stringify
(
data
),
ToastAndroid
.
SHORT
)
this
.
props
.
navigation
.
navigate
(
'Detail'
,
{
items
:
data
})
this
.
props
.
navigation
.
navigate
(
'Detail'
,
{
items
:
data
,
period
:
period
})
}
}
_queryReminder
()
{
_queryReminder
()
{
...
...
src/screens/ReminderDetail.js
View file @
cc571bdc
...
@@ -19,13 +19,14 @@ class ReminderDetail extends React.Component {
...
@@ -19,13 +19,14 @@ class ReminderDetail extends React.Component {
const
{
params
}
=
this
.
props
.
navigation
.
state
;
const
{
params
}
=
this
.
props
.
navigation
.
state
;
const
{
goBack
}
=
this
.
props
.
navigation
;
const
{
goBack
}
=
this
.
props
.
navigation
;
const
items
=
params
?
params
.
items
:
null
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
const
{
headerStyle
,
headerFontStyle
}
=
styles
return
(
return
(
<
Container
style
=
{{
backgroundColor
:
'white'
}}
>
<
Container
style
=
{{
backgroundColor
:
'white'
}}
>
<
AppHeader
<
AppHeader
headerText
=
{
"Morning"
}
headerText
=
{
period
}
headerLeft
=
{
headerLeft
=
{
<
Button
onPress
=
{()
=>
goBack
()}
>
<
Button
onPress
=
{()
=>
goBack
()}
>
<
Icon
name
=
'arrow-back'
/>
<
Icon
name
=
'arrow-back'
/>
...
...
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