fix icon and statusbar bug
This commit is contained in:
parent
71eed8cafd
commit
db29f4c15d
2
App.js
2
App.js
@ -28,7 +28,7 @@ export default function App(){
|
|||||||
<NavigationContainer name= "Root" ref={navigationRef} style={{flex:1}}>
|
<NavigationContainer name= "Root" ref={navigationRef} style={{flex:1}}>
|
||||||
<Tab.Navigator>
|
<Tab.Navigator>
|
||||||
<Stack.Screen name="login" component={top} options={{ tabBarLabel: '位置情報',headerTransparent:true,gestureEnabled:true,tabBarIcon: ({ color, size }) => (<AntDesign name="barchart" size={32} />),}}/>
|
<Stack.Screen name="login" component={top} options={{ tabBarLabel: '位置情報',headerTransparent:true,gestureEnabled:true,tabBarIcon: ({ color, size }) => (<AntDesign name="barchart" size={32} />),}}/>
|
||||||
<Stack.Screen name="menuPage" component={menuPage} options={{ tabBarLabel: 'リンク',headerTransparent:true,gestureEnabled:true,tabBarIcon: ({ color, size }) => (<Ionicons name="ios-radio" size={platform}/>),}}/>
|
<Stack.Screen name="menuPage" component={menuPage} options={{ tabBarLabel: 'リンク',headerTransparent:true,gestureEnabled:true,tabBarIcon: ({ color, size }) => (<Ionicons name="ios-radio" size={32}/>),}}/>
|
||||||
<Stack.Screen name="home" component={tndView} options={{ tabBarLabel: '運行情報',headerTransparent:true,gestureEnabled:true,tabBarIcon: ({ color, size }) => (<Ionicons name="md-train" size={32}/>),}}/>
|
<Stack.Screen name="home" component={tndView} options={{ tabBarLabel: '運行情報',headerTransparent:true,gestureEnabled:true,tabBarIcon: ({ color, size }) => (<Ionicons name="md-train" size={32}/>),}}/>
|
||||||
|
|
||||||
</Tab.Navigator>
|
</Tab.Navigator>
|
||||||
|
4
Apps.js
4
Apps.js
@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useRef, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import {View, Platform, ToastAndroid} from 'react-native';
|
import {View, Platform,ToastAndroid} from 'react-native';
|
||||||
import {WebView} from 'react-native-webview';
|
import {WebView} from 'react-native-webview';
|
||||||
import Constants from 'expo-constants';
|
import Constants from 'expo-constants';
|
||||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
@ -716,7 +716,7 @@ const injectJavascriptData = bootData+trainIconMaker+textInsert;
|
|||||||
},[])
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{height:"100%",paddingTop: Constants.statusBarHeight,}}>
|
<View style={{height:"100%",paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight: 0,}}>
|
||||||
{/* {Status} */}
|
{/* {Status} */}
|
||||||
<WebView
|
<WebView
|
||||||
useWebKit={true}
|
useWebKit={true}
|
||||||
|
4
menu.js
4
menu.js
@ -1,5 +1,5 @@
|
|||||||
import React, { Component, useRef, useState, useEffect } from 'react';
|
import React, { Component, useRef, useState, useEffect } from 'react';
|
||||||
import {StatusBar,View,LayoutAnimation,ScrollView,Linking,Text,TouchableOpacity } from 'react-native';
|
import {StatusBar,Platform,View,LayoutAnimation,ScrollView,Linking,Text,TouchableOpacity } from 'react-native';
|
||||||
import Image from 'react-native-remote-svg';
|
import Image from 'react-native-remote-svg';
|
||||||
import Constants from 'expo-constants';
|
import Constants from 'expo-constants';
|
||||||
import { List, ListItem } from 'native-base';
|
import { List, ListItem } from 'native-base';
|
||||||
@ -219,7 +219,7 @@ export default function Menu(props) {
|
|||||||
|
|
||||||
})
|
})
|
||||||
return (
|
return (
|
||||||
<View style={{height:"100%",paddingTop: Constants.statusBarHeight,backgroundColor:"white"}}>
|
<View style={{height:"100%",backgroundColor:"white",paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight : 0}}>
|
||||||
{Status}
|
{Status}
|
||||||
<View style={{alignItems:"center"}}>
|
<View style={{alignItems:"center"}}>
|
||||||
<TouchableOpacity onPress={()=>Linking.openURL("https://www.jr-shikoku.co.jp")}>
|
<TouchableOpacity onPress={()=>Linking.openURL("https://www.jr-shikoku.co.jp")}>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { StatusBar,View,Linking,Text} from 'react-native';
|
import { StatusBar,View,Linking,Platform,Text} from 'react-native';
|
||||||
import {WebView} from 'react-native-webview';
|
import {WebView} from 'react-native-webview';
|
||||||
import Constants from 'expo-constants';
|
import Constants from 'expo-constants';
|
||||||
import { TouchableOpacity } from 'react-native-gesture-handler';
|
import { TouchableOpacity } from 'react-native-gesture-handler';
|
||||||
export default function tndView () {
|
export default function tndView () {
|
||||||
return (
|
return (
|
||||||
<View style={{backgroundColor: '#309AC3', height:"100%",paddingTop: Constants.statusBarHeight,}}>
|
<View style={{backgroundColor: '#309AC3', height:"100%",paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight: 0,}}>
|
||||||
<WebView
|
<WebView
|
||||||
useWebKit={true}
|
useWebKit={true}
|
||||||
source={{uri: 'https://www.jr-shikoku.co.jp/info/'}}
|
source={{uri: 'https://www.jr-shikoku.co.jp/info/'}}
|
||||||
|
Loading…
Reference in New Issue
Block a user