File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
demo/src/screens/componentScreens Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ export default class ButtonsScreen extends DemoScreen {
65
65
return (
66
66
< View useSafeArea >
67
67
{ ! ! snippet && < SnippetBlock snippet = { snippet } onClose = { ( ) => this . hideSnippet ( ) } /> }
68
- < ScrollView >
68
+ < ScrollView showsVerticalScrollIndicator = { false } >
69
69
< View centerH >
70
70
< Text style = { styles . title } > Buttons</ Text >
71
71
Original file line number Diff line number Diff line change @@ -176,6 +176,21 @@ export default class Button extends PureBaseComponent {
176
176
}
177
177
}
178
178
179
+ componentDidMount ( ) {
180
+ Constants . addDimensionsEventListener ( this . onOrientationChanged ) ;
181
+ }
182
+
183
+ componentWillUnmount ( ) {
184
+ Constants . removeDimensionsEventListener ( this . onOrientationChanged ) ;
185
+ }
186
+
187
+ onOrientationChanged = ( ) => {
188
+ if ( Constants . isTablet && this . props . fullWidth ) {
189
+ // only to trigger re-render
190
+ this . setState ( { isLandscape : Constants . isLandscape } ) ;
191
+ }
192
+ } ;
193
+
179
194
// This method will be called more than once in case of layout change!
180
195
onLayout = event => {
181
196
const height = event . nativeEvent . layout . height ;
You can’t perform that action at this time.
0 commit comments