Browse Source

Fixed banner content offset

Arnaud Vergnet 1 year ago
parent
commit
50a5f087b6
2 changed files with 27 additions and 18 deletions
  1. 11
    6
      src/screens/Planex/PlanexScreen.js
  2. 16
    12
      src/screens/Proxiwash/ProxiwashScreen.js

+ 11
- 6
src/screens/Planex/PlanexScreen.js View File

@@ -302,10 +302,18 @@ class PlanexScreen extends React.Component<Props, State> {
302 302
             <View
303 303
                 style={{flex: 1}}
304 304
             >
305
+                {/*Allow to draw webview bellow banner*/}
306
+                <View style={{
307
+                    position: 'absolute',
308
+                    height: '100%',
309
+                    width: '100%',
310
+                }}>
311
+                    {this.props.theme.dark // Force component theme update
312
+                        ? this.getWebView()
313
+                        : <View style={{height: '100%'}}>{this.getWebView()}</View>}
314
+                </View>
305 315
                 <Banner
306
-                    style={{
307
-                        marginTop: this.state.bannerVisible ? containerPaddingTop : 0,
308
-                    }}
316
+                    style={{marginTop: containerPaddingTop,}}
309 317
                     visible={this.state.bannerVisible}
310 318
                     actions={[
311 319
                         {
@@ -330,9 +338,6 @@ class PlanexScreen extends React.Component<Props, State> {
330 338
                     onDismiss={this.hideDialog}
331 339
                     title={this.state.dialogTitle}
332 340
                     message={this.state.dialogMessage}/>
333
-                {this.props.theme.dark // Force component theme update
334
-                    ? this.getWebView()
335
-                    : <View style={{height: '100%'}}>{this.getWebView()}</View>}
336 341
                 <AnimatedBottomBar
337 342
                     {...this.props}
338 343
                     ref={this.barRef}

+ 16
- 12
src/screens/Proxiwash/ProxiwashScreen.js View File

@@ -424,10 +424,23 @@ class ProxiwashScreen extends React.Component<Props, State> {
424 424
             <View
425 425
                 style={{flex: 1}}
426 426
             >
427
+                <View style={{
428
+                    position: "absolute",
429
+                    width: "100%",
430
+                    height: "100%",
431
+                }}>
432
+                    <WebSectionList
433
+                        createDataset={this.createDataset}
434
+                        navigation={nav}
435
+                        fetchUrl={DATA_URL}
436
+                        renderItem={this.getRenderItem}
437
+                        renderSectionHeader={this.getRenderSectionHeader}
438
+                        autoRefreshTime={REFRESH_TIME}
439
+                        refreshOnFocus={true}
440
+                        updateData={this.state.machinesWatched.length}/>
441
+                </View>
427 442
                 <Banner
428
-                    style={{
429
-                        marginTop: this.state.bannerVisible ? containerPaddingTop : 0,
430
-                    }}
443
+                    style={{marginTop: containerPaddingTop,}}
431 444
                     visible={this.state.bannerVisible}
432 445
                     actions={[
433 446
                         {
@@ -445,15 +458,6 @@ class ProxiwashScreen extends React.Component<Props, State> {
445 458
                 <CustomModal onRef={this.onModalRef}>
446 459
                     {this.state.modalCurrentDisplayItem}
447 460
                 </CustomModal>
448
-                <WebSectionList
449
-                    createDataset={this.createDataset}
450
-                    navigation={nav}
451
-                    fetchUrl={DATA_URL}
452
-                    renderItem={this.getRenderItem}
453
-                    renderSectionHeader={this.getRenderSectionHeader}
454
-                    autoRefreshTime={REFRESH_TIME}
455
-                    refreshOnFocus={true}
456
-                    updateData={this.state.machinesWatched.length}/>
457 461
             </View>
458 462
         );
459 463
     }

Loading…
Cancel
Save