Skip to content

Commit 8c4684e

Browse files
authored
Merge pull request #1723 from StoDevX/webcam-touchable-highlight
Fix webcam onpress highlight
2 parents 7aa486d + 685188f commit 8c4684e

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

source/views/streaming/webcams.js

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -161,23 +161,27 @@ class StreamThumbnail extends React.PureComponent<void, ThumbnailProps, void> {
161161
: transparentPixel
162162

163163
return (
164-
<Touchable
165-
highlight={true}
166-
underlayColor={baseColor}
167-
activeOpacity={0.7}
168-
onPress={this.handlePress}
169-
>
170-
<Image source={img} style={[styles.image, {width, height}]}>
171-
<View style={styles.titleWrapper}>
172-
<LinearGradient
173-
colors={[startColor, baseColor]}
174-
locations={[0, 0.8]}
175-
>
176-
<Text style={[styles.titleText, {color: textColor}]}>{name}</Text>
177-
</LinearGradient>
178-
</View>
179-
</Image>
180-
</Touchable>
164+
<View style={styles.cell}>
165+
<Touchable
166+
highlight={true}
167+
underlayColor={baseColor}
168+
activeOpacity={0.7}
169+
onPress={this.handlePress}
170+
>
171+
<Image source={img} style={{width, height}}>
172+
<View style={styles.titleWrapper}>
173+
<LinearGradient
174+
colors={[startColor, baseColor]}
175+
locations={[0, 0.8]}
176+
>
177+
<Text style={[styles.titleText, {color: textColor}]}>
178+
{name}
179+
</Text>
180+
</LinearGradient>
181+
</View>
182+
</Image>
183+
</Touchable>
184+
</View>
181185
)
182186
}
183187
}
@@ -189,14 +193,15 @@ const styles = StyleSheet.create({
189193
padding: CELL_MARGIN / 2,
190194
flexDirection: 'row',
191195
},
196+
cell: {
197+
overflow: 'hidden',
198+
margin: CELL_MARGIN / 2,
199+
borderRadius: 6,
200+
},
192201
column: {
193202
flex: 1,
194203
alignItems: 'center',
195204
},
196-
image: {
197-
margin: CELL_MARGIN / 2,
198-
borderRadius: 6,
199-
},
200205
titleWrapper: {
201206
flex: 1,
202207
justifyContent: 'flex-end',

0 commit comments

Comments
 (0)