Commit 912deed3 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

update image

See merge request !8
parents f67c2a6e f8976578
import React, { Component } from 'react'
import { ScrollView, Text, KeyboardAvoidingView, BackHandler } from 'react-native'
import { ScrollView, Text, KeyboardAvoidingView, BackHandler, View, Image } from 'react-native'
import { connect } from 'react-redux'
// Add Actions - replace 'Your' with whatever your reducer is called :)
// import YourActions from '../Redux/YourRedux'
// Styles
import styles from './Styles/CategoryScreenStyle'
import BaseHeader from '../Components/BaseHeader';
import { Images } from '../Themes';
class CategoryScreen extends Component {
constructor(props) {
super(props)
this.state = {
listCategory: [
Images.categoryPakaian,
Images.categoryJaket,
Images.categoryCelana,
Images.categorySepatu,
Images.categoryAksesoris,
Images.categoryTas,
Images.categorySale,
]
}
}
backAction = () => {
this.props.navigation.goBack()
return true;
......@@ -25,11 +40,18 @@ class CategoryScreen extends Component {
render () {
return (
<ScrollView style={styles.container}>
<KeyboardAvoidingView behavior='position'>
<Text>CategoryScreen</Text>
</KeyboardAvoidingView>
</ScrollView>
<View style={{flex: 1, backgroundColor: '#4cc9f0'}}>
<BaseHeader onBackPress={() => this.props.navigation.goBack()} leftText={'Kategori'}/>
<ScrollView showsVerticalScrollIndicator={false} style={[styles.scrollContent, {paddingHorizontal: 25, paddingTop: 25}]}>
{this.state.listCategory.map((item, index) => {
return (
<View style={{marginTop: index == 0? 0 : 15, marginBottom: index == this.state.listCategory.length -1? 50 : 0, elevation: 2, borderRadius: 15}} key={index}>
<Image source={item} style={{width: '100%', height: 100, borderRadius: 10, resizeMode: 'stretch'}}/>
</View>
)
})}
</ScrollView>
</View>
)
}
}
......
......@@ -11,6 +11,13 @@ const images = {
icon_backbulat: require('../Images/Icons/icon_backbulat.png'),
icon_backwhite: require('../Images/Icons/icon_backwhite.png'),
closeBlack: require('../Images/Icons/icon_close_black.png'),
categoryAksesoris: require('../Images/categoryAksesoris.png'),
categoryCelana: require('../Images/categoryCelana.png'),
categoryJaket: require('../Images/categoryJaket.png'),
categoryPakaian: require('../Images/categoryPakaian.png'),
categorySale: require('../Images/categorySale.png'),
categorySepatu: require('../Images/categorySepatu.png'),
categoryTas: require('../Images/categoryTas.png'),
// big image
letter: require('../Images/letter.png'),
......
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