fix icon and statusbar bug

This commit is contained in:
harukin-DeskMini 2022-06-29 21:43:00 +09:00
parent 71eed8cafd
commit db29f4c15d
4 changed files with 7 additions and 7 deletions

2
App.js
View File

@ -28,7 +28,7 @@ export default function App(){
<NavigationContainer name= "Root" ref={navigationRef} style={{flex:1}}>
<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="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}/>),}}/>
</Tab.Navigator>

View File

@ -1,5 +1,5 @@
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 Constants from 'expo-constants';
import AsyncStorage from '@react-native-async-storage/async-storage';
@ -716,7 +716,7 @@ const injectJavascriptData = bootData+trainIconMaker+textInsert;
},[])
return (
<View style={{height:"100%",paddingTop: Constants.statusBarHeight,}}>
<View style={{height:"100%",paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight: 0,}}>
{/* {Status} */}
<WebView
useWebKit={true}

View File

@ -1,5 +1,5 @@
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 Constants from 'expo-constants';
import { List, ListItem } from 'native-base';
@ -219,7 +219,7 @@ export default function Menu(props) {
})
return (
<View style={{height:"100%",paddingTop: Constants.statusBarHeight,backgroundColor:"white"}}>
<View style={{height:"100%",backgroundColor:"white",paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight : 0}}>
{Status}
<View style={{alignItems:"center"}}>
<TouchableOpacity onPress={()=>Linking.openURL("https://www.jr-shikoku.co.jp")}>

View File

@ -1,11 +1,11 @@
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 Constants from 'expo-constants';
import { TouchableOpacity } from 'react-native-gesture-handler';
export default function tndView () {
return (
<View style={{backgroundColor: '#309AC3', height:"100%",paddingTop: Constants.statusBarHeight,}}>
<View style={{backgroundColor: '#309AC3', height:"100%",paddingTop: Platform.OS == "ios" ? Constants.statusBarHeight: 0,}}>
<WebView
useWebKit={true}
source={{uri: 'https://www.jr-shikoku.co.jp/info/'}}