Commit 7697c17b by Giang Tran

edit setting screen

parent 9665a612
......@@ -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}>Bt 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}>Bt 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>
......
......@@ -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',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment