幅指定をuseWindowDimensionsに変更
This commit is contained in:
parent
38052abd30
commit
93529f4f7d
12
Apps.js
12
Apps.js
@ -1,10 +1,4 @@
|
||||
import React, {
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
useRef,
|
||||
useState,
|
||||
useCallback,
|
||||
} from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import {
|
||||
View,
|
||||
Platform,
|
||||
@ -16,10 +10,6 @@ import { WebView } from "react-native-webview";
|
||||
import Constants from "expo-constants";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
|
||||
import {
|
||||
widthPercentageToDP as wp,
|
||||
heightPercentageToDP as hp,
|
||||
} from "react-native-responsive-screen";
|
||||
import { AS } from "./storageControl";
|
||||
import { news } from "./config/newsUpdate";
|
||||
import { getStationList, lineList } from "./lib/getStationList";
|
||||
|
@ -1,5 +1,10 @@
|
||||
import React from "react";
|
||||
import { View, Text, TouchableOpacity } from "react-native";
|
||||
import {
|
||||
View,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
useWindowDimensions,
|
||||
} from "react-native";
|
||||
import { StateBox } from "./StateBox";
|
||||
import {
|
||||
heightPercentageToDP,
|
||||
@ -13,13 +18,14 @@ export const TrainDataView = ({
|
||||
openTrainInfo,
|
||||
mode = 0,
|
||||
}) => {
|
||||
const { width, height } = useWindowDimensions();
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
//minHeight: 200,
|
||||
//height: heightPercentageToDP("20%"),
|
||||
width: widthPercentageToDP("100%"),
|
||||
width: width,
|
||||
flex: 1,
|
||||
}}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user