レイアウト設定のデザイン調整
This commit is contained in:
parent
a99649ba59
commit
473f3a1dba
@ -58,7 +58,7 @@ export const LayoutSettings = ({
|
|||||||
padding: 10,
|
padding: 10,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
設定画面
|
レイアウト設定
|
||||||
</Text>
|
</Text>
|
||||||
<View style={{ flex: 1 }}></View>
|
<View style={{ flex: 1 }}></View>
|
||||||
</View>
|
</View>
|
||||||
@ -90,15 +90,14 @@ export const LayoutSettings = ({
|
|||||||
trueText={"オリジナル\n(駅名標)"}
|
trueText={"オリジナル\n(駅名標)"}
|
||||||
falseImage={require("../../assets/configuration/station_default.jpg")}
|
falseImage={require("../../assets/configuration/station_default.jpg")}
|
||||||
trueImage={require("../../assets/configuration/station_original.jpg")}
|
trueImage={require("../../assets/configuration/station_original.jpg")}
|
||||||
/>
|
>
|
||||||
{stationMenu == "true" && (
|
|
||||||
<SimpleSwitch
|
<SimpleSwitch
|
||||||
bool={usePDFView}
|
bool={usePDFView}
|
||||||
setBool={setUsePDFView}
|
setBool={setUsePDFView}
|
||||||
color="red"
|
color="red"
|
||||||
str="時刻表PDFをアプリの外で表示する"
|
str="時刻表PDFをアプリの外で表示する"
|
||||||
/>
|
/>
|
||||||
)}
|
</SwitchArea>
|
||||||
<SwitchArea
|
<SwitchArea
|
||||||
str="列車メニュー"
|
str="列車メニュー"
|
||||||
bool={trainMenu}
|
bool={trainMenu}
|
||||||
@ -107,9 +106,7 @@ export const LayoutSettings = ({
|
|||||||
trueText={"オリジナル"}
|
trueText={"オリジナル"}
|
||||||
falseImage={require("../../assets/configuration/train_default.jpg")}
|
falseImage={require("../../assets/configuration/train_default.jpg")}
|
||||||
trueImage={require("../../assets/configuration/train_original.jpg")}
|
trueImage={require("../../assets/configuration/train_original.jpg")}
|
||||||
/>
|
>
|
||||||
{trainMenu == "true" && (
|
|
||||||
<>
|
|
||||||
<TripleSwitchArea
|
<TripleSwitchArea
|
||||||
str={"ヘッダーサイズ"}
|
str={"ヘッダーサイズ"}
|
||||||
bool={headerSize}
|
bool={headerSize}
|
||||||
@ -136,8 +133,7 @@ export const LayoutSettings = ({
|
|||||||
color="red"
|
color="red"
|
||||||
str="列車の現在位置をアイコン表示"
|
str="列車の現在位置をアイコン表示"
|
||||||
/>
|
/>
|
||||||
</>
|
</SwitchArea>
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</View>
|
</View>
|
||||||
@ -151,12 +147,12 @@ const SimpleSwitch = ({ bool, setBool, str }) => (
|
|||||||
checkedColor="red"
|
checkedColor="red"
|
||||||
onPress={() => setBool(bool == "true" ? "false" : "true")}
|
onPress={() => setBool(bool == "true" ? "false" : "true")}
|
||||||
containerStyle={{
|
containerStyle={{
|
||||||
width: "100%",
|
flex: 1,
|
||||||
backgroundColor: "white",
|
backgroundColor: "#00000000",
|
||||||
borderColor: "white",
|
borderColor: "white",
|
||||||
alignContent: "center",
|
alignContent: "center",
|
||||||
}}
|
}}
|
||||||
textStyle={{ fontSize: 20 }}
|
textStyle={{ fontSize: 20, fontWeight: "normal" }}
|
||||||
title={str}
|
title={str}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
@ -4,6 +4,7 @@ import {
|
|||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
Text,
|
Text,
|
||||||
Image,
|
Image,
|
||||||
|
LayoutAnimation,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
export const SimpleSwitch = ({
|
export const SimpleSwitch = ({
|
||||||
bool,
|
bool,
|
||||||
@ -27,7 +28,10 @@ export const SimpleSwitch = ({
|
|||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
flex: 1,
|
flex: 1,
|
||||||
}}
|
}}
|
||||||
onPress={() => setBool(value.toString())}
|
onPress={() => {
|
||||||
|
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
||||||
|
setBool(value.toString());
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
source={image}
|
source={image}
|
||||||
|
@ -8,9 +8,18 @@ export const SwitchArea = ({
|
|||||||
trueImage,
|
trueImage,
|
||||||
falseText,
|
falseText,
|
||||||
trueText,
|
trueText,
|
||||||
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<View style={{ flexDirection: "column", padding: 10 }}>
|
<View
|
||||||
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
padding: 10,
|
||||||
|
backgroundColor: "#00000010",
|
||||||
|
borderRadius: 10,
|
||||||
|
margin: 5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
@ -18,6 +27,7 @@ export const SwitchArea = ({
|
|||||||
alignContent: "center",
|
alignContent: "center",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
textAlignVertical: "center",
|
textAlignVertical: "center",
|
||||||
|
fontWeight: "bold",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{str}
|
{str}
|
||||||
@ -40,6 +50,7 @@ export const SwitchArea = ({
|
|||||||
subText={trueText}
|
subText={trueText}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
{bool == "true" && children}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@ export const TripleSwitchArea = ({
|
|||||||
<View style={{ flexDirection: "column", padding: 10 }}>
|
<View style={{ flexDirection: "column", padding: 10 }}>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontSize: 25,
|
fontSize: 20,
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
alignContent: "center",
|
alignContent: "center",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
|
Loading…
Reference in New Issue
Block a user