Skip to content

Commit 0e59e67

Browse files
committed
play button and flat render episode item UI styling
1 parent 2152b0e commit 0e59e67

File tree

2 files changed

+37
-7
lines changed

2 files changed

+37
-7
lines changed

src/HomeScreen.js

+37-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
Image
1010
} from 'react-native';
1111
import Modal from 'react-native-modal'
12-
import { Text } from 'react-native-ui-kitten'
12+
import { Text, Button } from 'react-native-ui-kitten'
1313
import { SafeAreaView } from 'react-navigation'
1414
import { FlatList } from 'react-native-gesture-handler';
1515

@@ -48,13 +48,43 @@ class HomeScreen extends Component {
4848
const { title, imageUrl } = item
4949

5050
return (
51-
<View style={{ flexDirection: 'row', marginBottom: 10 }} >
51+
<View style={{ flexDirection: 'row', marginBottom: 10, backgroundColor: 'yellow' }} >
5252
<Image style={{ height: 100, width: 100, borderRadius: 12 }} source={{ uri: imageUrl }} />
53-
<Text style={{ marginLeft: 20, marginTop: 8 }} category="h6" >{title}</Text>
54-
55-
<Text
56-
style={{ position: 'absolute', right: 0, marginTop: 12 }}
57-
category="h7" >$9.87</Text>
53+
<View
54+
style={{ marginLeft: 20, flexDirection: 'column', backgroundColor: 'blue' }}
55+
>
56+
<Text
57+
style={{ marginTop: 8 }}
58+
category="h6"
59+
>
60+
{title}
61+
</Text>
62+
<Text
63+
style={{ marginTop: 8, position: 'absolute', bottom: 8, backgroundColor: 'red' }}
64+
category="h7"
65+
>
66+
⭐ 9.3
67+
</Text>
68+
</View>
69+
<View
70+
style={{ flex: 1, backgroundColor: 'grey' }}
71+
>
72+
<Text
73+
style={{ position: 'absolute', right: 0, marginTop: 16 }}
74+
category="h7">$9.87</Text>
75+
<Button
76+
status="white"
77+
size="tiny"
78+
style={{ backgroundColor: '#E0E0E0', borderRadius: 30, position: 'absolute', right: 0, bottom: 0, width: 60 }}
79+
icon={(style) => {
80+
return <Image
81+
style={{ height: 16, width: 16 }}
82+
tintColor="#424242"
83+
source={require('./img/media-play.png')}></Image>
84+
}}
85+
>
86+
</Button>
87+
</View>
5888
</View>
5989
)
6090
}

src/img/media-play.png

1.49 KB
Loading

0 commit comments

Comments
 (0)