Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Giang Tran
InvestCustomer
Commits
7697c17b
Commit
7697c17b
authored
Mar 17, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit setting screen
parent
9665a612
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
SettingView.js
src/Screens/Setting/SettingView.js
+14
-12
PickerItem.js
src/components/Picker/PickerItem.js
+2
-0
No files found.
src/Screens/Setting/SettingView.js
View file @
7697c17b
...
...
@@ -20,33 +20,35 @@ const SettingView = (props) => {
const
[
isEnabled
,
setIsEnabled
]
=
useState
(
true
);
const
toggleSwitch
=
()
=>
setIsEnabled
((
previousState
)
=>
!
previousState
);
const
[
language
,
setLanguage
]
=
useState
(
dataTest
[
2
]
);
const
[
language
,
setLanguage
]
=
useState
(
dataTest
[
0
].
name
);
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'Cài đặt'
}
/
>
<
View
style
=
{{
flex
:
1
,
padding
:
10
}}
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
B
ậ
t
th
ô
ng
b
á
o
<
/Text
>
<
Switch
trackColor
=
{{
false
:
'#DBDBDB'
,
true
:
'#1C6AF6'
}}
ios_backgroundColor
=
"#767577"
thumbColor
=
{
'#f4f3f4'
}
onValueChange
=
{
toggleSwitch
}
value
=
{
isEnabled
}
/
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
Ng
ô
n
ng
ữ
<
/Text
>
<
PickerItem
defaultValue
=
{
language
}
width
=
{
200
}
value
=
{
language
}
data
=
{
dataTest
}
onValueChange
=
{(
value
,
items
)
=>
{
setLanguage
(
items
);
setLanguage
(
items
.
name
);
}}
/
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
B
ậ
t
th
ô
ng
b
á
o
<
/Text
>
<
Switch
trackColor
=
{{
false
:
'#767577'
,
true
:
'#1C6AF6'
}}
ios_backgroundColor
=
"#767577"
onValueChange
=
{
toggleSwitch
}
value
=
{
isEnabled
}
/
>
<
/View
>
<
/View
>
<
Text
>
SettingView
1
screen
<
/Text
>
...
...
src/components/Picker/PickerItem.js
View file @
7697c17b
...
...
@@ -7,6 +7,7 @@ import {
TouchableOpacity
,
TouchableHighlight
,
Dimensions
,
Platform
,
}
from
'react-native'
;
import
ModalDropdown
from
'react-native-modal-dropdown'
;
import
R
from
'../../assets/R'
;
...
...
@@ -216,6 +217,7 @@ const styles = StyleSheet.create({
shadowOpacity
:
0.2
,
shadowRadius
:
1.41
,
elevation
:
2
,
marginTop
:
Platform
.
OS
==
'ios'
?
0
:
-
21
,
},
dropdown_row
:
{
flexDirection
:
'row'
,
...
...
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