Skip to content

Commit 2be09c7

Browse files
committed
Make image proprely size to screen width
1 parent 08969ac commit 2be09c7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/views/building-hours/detail/building.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const transparentPixel = require('../../../../images/transparent.png')
2121

2222
const styles = StyleSheet.create({
2323
container: {
24+
alignItems: 'stretch',
2425
...Platform.select({
2526
android: {
2627
backgroundColor: c.androidLightBackground,
@@ -31,6 +32,7 @@ const styles = StyleSheet.create({
3132
}),
3233
},
3334
image: {
35+
width: null,
3436
height: 100,
3537
},
3638
})
@@ -61,15 +63,16 @@ export class BuildingDetail extends React.Component<void, Props, void> {
6163

6264
return (
6365
<ScrollView contentContainerStyle={styles.container}>
64-
<Image source={headerImage} style={styles.image} />
65-
<Header building={info} />
66+
<Image source={headerImage} resizeMode="cover" style={styles.image} />
6667

68+
<Header building={info} />
6769
<Badge status={openStatus} />
6870
<ScheduleTable
6971
schedules={schedules}
7072
now={now}
7173
onProblemReport={onProblemReport}
7274
/>
75+
7376
<ListFooter
7477
title={
7578
'Building hours subject to change without notice\n\nData collected by the humans of All About Olaf'

0 commit comments

Comments
 (0)