アイコンの設定更新

This commit is contained in:
harukin-expo-dev-env 2025-01-28 13:47:46 +00:00
parent 2176b5511a
commit a979fee6ec
64 changed files with 712 additions and 180 deletions

471
app.json
View File

@ -1,79 +1,13 @@
{
"expo": {
"name": "JR四国運行状況",
"name": "JR四国非公式",
"slug": "jrshikoku",
"platforms": ["ios", "android"],
"plugins": [
"expo-localization",
[
"expo-video",
{
"supportsBackgroundPlayback": true,
"supportsPictureInPicture": true
}
],
[
"react-native-android-widget",
{
"widgets": [
{
"name": "JR_shikoku_train_info",
"label": "JR四国列車遅延速報EX",
"minWidth": "70dp",
"minHeight": "50dp",
"description": "JR四国列車遅延速報EXのウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。",
"previewImage": "./assets/icon.png",
"updatePeriodMillis": 1800000,
"resizeMode": "horizontal|vertical"
}
]
}
],
"expo-font",
[
"expo-screen-orientation",
{
"initialOrientation": "DEFAULT"
}
],
[
"expo-location",
{
"locationWhenInUsePermission": "この位置情報は、リンク画面で現在地側近の駅情報を取得するのに使用されます。"
}
],
[
"expo-alternate-app-icons",
[
{
"name": "EF65",
"ios": {
"light":"./assets/icons/ef65_rp0.png",
"dark":"./assets/icons/ef65_rp0.png",
"tinted":"./assets/icons/ef65_rp0.png"
},
"android": {
"foregroundImage": "./assets/icons/ef65_rp0.png",
"backgroundColor": "#001413"
}
},
{
"name": "8000NN",
"ios": "./assets/icons/s8000nn.png",
"android": {
"foregroundImage": "./assets/icons/s8000nn.png",
"backgroundColor": "#001413"
}
}
]
]
],
"version": "6.0",
"orientation": "default",
"icon": "./assets/icons/s8000nn.png",
"icon": "./assets/icons/s8600.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "vertical",
"backgroundColor": "#00b8ff"
},
"updates": {
@ -82,7 +16,7 @@
},
"assetBundlePatterns": ["**/*"],
"ios": {
"buildNumber": "39",
"buildNumber": "41",
"supportsTablet": false,
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
"config": {
@ -103,7 +37,7 @@
},
"android": {
"package": "jrshikokuinfo.xprocess.hrkn",
"versionCode": 22,
"versionCode": 23,
"permissions": [
"ACCESS_FINE_LOCATION",
"NFC"
@ -122,6 +56,401 @@
},
"runtimeVersion": {
"policy": "sdkVersion"
}
},
"plugins": [
"expo-font",
"expo-localization",
[
"expo-video",
{
"supportsBackgroundPlayback": true,
"supportsPictureInPicture": true
}
],
[
"expo-screen-orientation",
{
"initialOrientation": "DEFAULT"
}
],
[
"expo-location",
{
"locationWhenInUsePermission": "この位置情報は、リンク画面で現在地側近の駅情報を取得するのに使用されます。"
}
],
[
"react-native-android-widget",
{
"widgets": [
{
"name": "JR_shikoku_train_info",
"label": "列車遅延速報EX",
"minWidth": "70dp",
"minHeight": "50dp",
"description": "JR四国列車遅延速報EXのウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。",
"previewImage": "./assets/icon.png",
"updatePeriodMillis": 1800000,
"resizeMode": "horizontal|vertical"
},
{
"name": "JR_shikoku_train_strange",
"label": "怪レい列車",
"minWidth": "70dp",
"minHeight": "50dp",
"description": "JR四国怪レい列車BOTのウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。",
"previewImage": "./assets/icon.png",
"updatePeriodMillis": 1800000,
"resizeMode": "horizontal|vertical"
},
{
"name": "JR_shikoku_info",
"label": "運行情報",
"minWidth": "70dp",
"minHeight": "50dp",
"description": "JR四国運行情報のウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。",
"previewImage": "./assets/icon.png",
"updatePeriodMillis": 1800000,
"resizeMode": "horizontal|vertical"
},
{
"name": "JR_shikoku_apps_shortcut",
"label": "クイックアクセス",
"minWidth": "70dp",
"minHeight": "50dp",
"description": "JR四国非公式アプリの各種リンクを表示するウィジェットです。",
"previewImage": "./assets/icon.png",
"updatePeriodMillis": 1800000,
"resizeMode": "horizontal|vertical"
}
]
}
],
[
"expo-alternate-app-icons",
[
{
"name": "185mrt",
"ios": "./assets/icons/185_mrt.png",
"android": {
"foregroundImage": "./assets/icons/185_mrt.png",
"backgroundColor": "#001413"
}
},
{
"name": "32kpuuy",
"ios": "./assets/icons/32kpuuy.png",
"android": {
"foregroundImage": "./assets/icons/32kpuuy.png",
"backgroundColor": "#001413"
}
},
{
"name": "54",
"ios": "./assets/icons/54.png",
"android": {
"foregroundImage": "./assets/icons/54.png",
"backgroundColor": "#001413"
}
},
{
"name": "EF65",
"ios": "./assets/icons/ef65.png",
"android": {
"foregroundImage": "./assets/icons/ef65.png",
"backgroundColor": "#001413"
}
},
{
"name": "1500",
"ios": "./assets/icons/s1500.png",
"android": {
"foregroundImage": "./assets/icons/s1500.png",
"backgroundColor": "#001413"
}
},
{
"name": "185mm1",
"ios": "./assets/icons/s185mm1.png",
"android": {
"foregroundImage": "./assets/icons/s185mm1.png",
"backgroundColor": "#001413"
}
},
{
"name": "185ym1",
"ios": "./assets/icons/s185ym1.png",
"android": {
"foregroundImage": "./assets/icons/s185ym1.png",
"backgroundColor": "#001413"
}
},
{
"name": "2600",
"ios": "./assets/icons/s2600.png",
"android": {
"foregroundImage": "./assets/icons/s2600.png",
"backgroundColor": "#001413"
}
},
{
"name": "2700apy",
"ios": "./assets/icons/s2700apy.png",
"android": {
"foregroundImage": "./assets/icons/s2700apy.png",
"backgroundColor": "#001413"
}
},
{
"name": "6000p",
"ios": "./assets/icons/s6000p.png",
"android": {
"foregroundImage": "./assets/icons/s6000p.png",
"backgroundColor": "#001413"
}
},
{
"name": "8000ap",
"ios": "./assets/icons/s8000ap.png",
"android": {
"foregroundImage": "./assets/icons/s8000ap.png",
"backgroundColor": "#001413"
}
},
{
"name": "8600",
"ios": "./assets/icons/s8600.png",
"android": {
"foregroundImage": "./assets/icons/s8600.png",
"backgroundColor": "#001413"
}
},
{
"name": "213w",
"ios": "./assets/icons/w213w.png",
"android": {
"foregroundImage": "./assets/icons/w213w.png",
"backgroundColor": "#001413"
}
},
{
"name": "32",
"ios": "./assets/icons/32.png",
"android": {
"foregroundImage": "./assets/icons/32.png",
"backgroundColor": "#001413"
}
},
{
"name": "32tht",
"ios": "./assets/icons/32tht.png",
"android": {
"foregroundImage": "./assets/icons/32tht.png",
"backgroundColor": "#001413"
}
},
{
"name": "54st",
"ios": "./assets/icons/54st.png",
"android": {
"foregroundImage": "./assets/icons/54st.png",
"backgroundColor": "#001413"
}
},
{
"name": "1000",
"ios": "./assets/icons/s1000.png",
"android": {
"foregroundImage": "./assets/icons/s1000.png",
"backgroundColor": "#001413"
}
},
{
"name": "185iyor",
"ios": "./assets/icons/s185iyor.png",
"android": {
"foregroundImage": "./assets/icons/s185iyor.png",
"backgroundColor": "#001413"
}
},
{
"name": "185toai",
"ios": "./assets/icons/s185to_ai.png",
"android": {
"foregroundImage": "./assets/icons/s185to_ai.png",
"backgroundColor": "#001413"
}
},
{
"name": "2000asi",
"ios": "./assets/icons/s2000_asi.png",
"android": {
"foregroundImage": "./assets/icons/s2000_asi.png",
"backgroundColor": "#001413"
}
},
{
"name": "N2000",
"ios": "./assets/icons/s2000n.png",
"android": {
"foregroundImage": "./assets/icons/s2000n.png",
"backgroundColor": "#001413"
}
},
{
"name": "2700",
"ios": "./assets/icons/s2700.png",
"android": {
"foregroundImage": "./assets/icons/s2700.png",
"backgroundColor": "#001413"
}
},
{
"name": "5001",
"ios": "./assets/icons/s5001.png",
"android": {
"foregroundImage": "./assets/icons/s5001.png",
"backgroundColor": "#001413"
}
},
{
"name": "7000",
"ios": "./assets/icons/s7000.png",
"android": {
"foregroundImage": "./assets/icons/s7000.png",
"backgroundColor": "#001413"
}
},
{
"name": "8000nn",
"ios": "./assets/icons/s8000nn.png",
"android": {
"foregroundImage": "./assets/icons/s8000nn.png",
"backgroundColor": "#001413"
}
},
{
"name": "8000no",
"ios": "./assets/icons/s8000no.png",
"android": {
"foregroundImage": "./assets/icons/s8000no.png",
"backgroundColor": "#001413"
}
},
{
"name": "9640",
"ios": "./assets/icons/tosa9640.png",
"android": {
"foregroundImage": "./assets/icons/tosa9640.png",
"backgroundColor": "#001413"
}
},
{
"name": "285",
"ios": "./assets/icons/w285.png",
"android": {
"foregroundImage": "./assets/icons/w285.png",
"backgroundColor": "#001413"
}
},
{
"name": "32at",
"ios": "./assets/icons/32at.png",
"android": {
"foregroundImage": "./assets/icons/32at.png",
"backgroundColor": "#001413"
}
},
{
"name": "40",
"ios": "./assets/icons/40.png",
"android": {
"foregroundImage": "./assets/icons/40.png",
"backgroundColor": "#001413"
}
},
{
"name": "EF210",
"ios": "./assets/icons/ef210.png",
"android": {
"foregroundImage": "./assets/icons/ef210.png",
"backgroundColor": "#001413"
}
},
{
"name": "1200n",
"ios": "./assets/icons/s1200n.png",
"android": {
"foregroundImage": "./assets/icons/s1200n.png",
"backgroundColor": "#001413"
}
},
{
"name": "185iyoy",
"ios": "./assets/icons/s185iyoy.png",
"android": {
"foregroundImage": "./assets/icons/s185iyoy.png",
"backgroundColor": "#001413"
}
},
{
"name": "185tu",
"ios": "./assets/icons/s185tu.png",
"android": {
"foregroundImage": "./assets/icons/s185tu.png",
"backgroundColor": "#001413"
}
},
{
"name": "2002a",
"ios": "./assets/icons/s2002a.png",
"android": {
"foregroundImage": "./assets/icons/s2002a.png",
"backgroundColor": "#001413"
}
},
{
"name": "2700apr",
"ios": "./assets/icons/s2700apr.png",
"android": {
"foregroundImage": "./assets/icons/s2700apr.png",
"backgroundColor": "#001413"
}
},
{
"name": "5001k",
"ios": "./assets/icons/s5001k.png",
"android": {
"foregroundImage": "./assets/icons/s5001k.png",
"backgroundColor": "#001413"
}
},
{
"name": "s7200",
"ios": "./assets/icons/s7200.png",
"android": {
"foregroundImage": "./assets/icons/s7200.png",
"backgroundColor": "#001413"
}
},
{
"name": "8000nr",
"ios": "./assets/icons/s8000nr.png",
"android": {
"foregroundImage": "./assets/icons/s8000nr.png",
"backgroundColor": "#001413"
}
},
{
"name": "9640jgr",
"ios": "./assets/icons/tosa9640jgr.png",
"android": {
"foregroundImage": "./assets/icons/tosa9640jgr.png",
"backgroundColor": "#001413"
}
}
]
]
]
}
}

BIN
assets/icons/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
assets/icons/32at.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
assets/icons/32kpuuy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
assets/icons/32tht.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
assets/icons/40.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
assets/icons/54.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/icons/54st.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
assets/icons/ef210.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

BIN
assets/icons/ef65.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

45
assets/icons/icons.ts Normal file
View File

@ -0,0 +1,45 @@
export default () =>{
return [
{ "id": "32", "name": "キハ32形", "icon": require("./32.png") },
{ "id": "32kpuuy", "name": "キハ32形かっぱうようよ号", "icon": require("./32kpuuy.png") },
{ "id": "32tht", "name": "キハ32形新幹線ホビートレイン", "icon": require("./32tht.png") },
{ "id": "32at", "name": "キクハ32形アンパンマントロッコ", "icon": require("./32at.png") },
{ "id": "54", "name": "キハ54形", "icon": require("./54.png") },
{ "id": "54st", "name": "キハ54形しまんトロッコ", "icon": require("./54st.png") },
{ "id": "40", "name": "キハ40", "icon": require("./40.png") },
{ "id": "185mrt", "name": "キハ185系四国色", "icon": require("./s185_mrt.png") },
{ "id": "185tu", "name": "キハ185系剣山色", "icon": require("./s185tu.png") },
{ "id": "185iyor", "name": "キハ185系伊予灘ものがたり(赤)", "icon": require("./s185iyor.png") },
{ "id": "185iyoy", "name": "キハ185系伊予灘ものがたり(黄)", "icon": require("./s185iyoy.png") },
{ "id": "185toai", "name": "キハ185系藍よしのがわトロッコ", "icon": require("./s185to_ai.png") },
{ "id": "185mm1", "name": "キハ185系四国まんなか千年ものがたり(緑)", "icon": require("./s185mm1.png") },
{ "id": "185ym1", "name": "キハ185系時代の夜明けのものがたり(茶)", "icon": require("./s185ym1.png") },
{ "id": "1000", "name": "1000形", "icon": require("./s1000.png") },
{ "id": "1200n", "name": "1200形", "icon": require("./s1200n.png") },
{ "id": "1500", "name": "1500形", "icon": require("./s1500.png") },
{ "id": "5001", "name": "5000系(二階建て)", "icon": require("./s5001.png") },
{ "id": "5001k", "name": "5000系(平屋側)", "icon": require("./s5001k.png") },
{ "id": "6000p", "name": "6000系", "icon": require("./s6000p.png") },
{ "id": "7000", "name": "7000系", "icon": require("./s7000.png") },
{ "id": "7200", "name": "7200系", "icon": require("./s7200.png") },
{ "id": "2000asi", "name": "2000系", "icon": require("./s2000_asi.png") },
{ "id": "N2000", "name": "N2000系", "icon": require("./s2000n.png") },
{ "id": "2002a", "name": "2000系アンパンマン", "icon": require("./s2002a.png") },
{ "id": "2600", "name": "2600系" , "icon": require("./s2600.png")},
{ "id": "2700", "name": "2700系", "icon": require("./s2700.png") },
{ "id": "2700apy", "name": "2700系アンパンマン(黄)", "icon": require("./s2700apy.png") },
{ "id": "2700apr", "name": "2700系アンパンマン(赤)", "icon": require("./s2700apr.png") },
{ "id": "8000no", "name": "8000系(オレンジ)", "icon": require("./s8000no.png") },
{ "id": "8000nr", "name": "8000系(赤)", "icon": require("./s8000nr.png") },
{ "id": "8000ap", "name": "8000系アンパンマン", "icon": require("./s8000ap.png") },
{ "id": "8000nn", "name": "8000系リニューアル改", "icon": require("./s8000nn.png") },
{ "id": "8600", "name": "8600系", "icon": require("./s8600.png") },
{ "id": "9640", "name": "9640形(白)", "icon": require("./tosa9640.png") },
{ "id": "9640jgr", "name": "9640形オープンデッキ(緑)", "icon": require("./tosa9640jgr.png") },
{ "id": "285", "name": "285系サンライズ瀬戸", "icon": require("./w285.png") },
{ "id": "213w", "name": "ラ・マル・ド・ボァ", "icon": require("./w213w.png") },
{ "id": "EF65", "name": "EF65", "icon": require("./ef65.png") },
{ "id": "EF210", "name": "EF210", "icon": require("./ef210.png") },
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 934 B

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1004 B

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/icons/s2000n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1005 B

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -8,7 +8,6 @@ export const EachTrainInfo = ({ payload }) => {
return (
<ActionSheet
gestureEnabled={true}
//gestureEnabled={!actionSheetHorizonalScroll}
CustomHeaderComponent={<></>}
ref={actionSheetRef}
drawUnderStatusBar={false}

View File

@ -10,6 +10,7 @@ import {
LayoutAnimation,
} from "react-native";
import { SheetManager } from "react-native-actions-sheet";
import { useScrollHandlers } from "react-native-actions-sheet";
import { AS } from "../../storageControl";
import trainList from "../../assets/originData/trainList";
import { lineListPair } from "../../lib/getStationList";
@ -188,7 +189,7 @@ export const EachTrainInfoCore = ({
const count = position * 44 - 50;
// 0.5秒待機してからスクロール
setTimeout(
() => ScrollViewRef.current?.scrollTo({ y: count, animated: true }),
() => scrollHandlers.ref.current?.scrollTo({ y: count, animated: true }),
400
);
}
@ -219,8 +220,9 @@ export const EachTrainInfoCore = ({
const { height } = useWindowDimensions();
const { isLandscape } = useDeviceOrientationChange();
const ScrollViewRef = useRef();
const scrollHandlers = actionSheetRef
? useScrollHandlers("scrollview-1", actionSheetRef)
: null;
const [trueTrainID, setTrueTrainID] = useState();
useEffect(() => {
if (!data.trainNum) return;
@ -411,7 +413,7 @@ export const EachTrainInfoCore = ({
from={from}
styles={styles}
actionSheetRef={actionSheetRef}
ScrollViewRef={ScrollViewRef}
scrollHandlers={scrollHandlers}
containerProps={{
style: {
maxHeight: isLandscape ? height - 94 : (height / 100) * 70,

View File

@ -20,7 +20,7 @@ export const getInfoString = async () => {
}
return null;
});
ToastAndroid.show(`${text}`, ToastAndroid.SHORT);
//ToastAndroid.show(`${text}`, ToastAndroid.SHORT);
return { time, text };
};

View File

@ -20,7 +20,7 @@ export const getDelayData = async () => {
}
return null;
});
ToastAndroid.show(`${delayString}`, ToastAndroid.SHORT);
//ToastAndroid.show(`${delayString}`, ToastAndroid.SHORT);
return { time, delayString };
};
export function TraInfoEXWidget({ time, delayString }) {

View File

@ -20,11 +20,11 @@ export async function widgetTaskHandler(props) {
const WidgetName = await AS.getItem(
`widgetType/${widgetInfo.widgetId}`
).catch((e) => "JR_shikoku_train_info");
ToastAndroid.show(
`Widget Action: ${JSON.stringify(widgetInfo.widgetId)}`,
ToastAndroid.SHORT
);
ToastAndroid.show(`Widget Name: ${WidgetName}`, ToastAndroid.SHORT);
// ToastAndroid.show(
// `Widget Action: ${JSON.stringify(widgetInfo.widgetId)}`,
// ToastAndroid.SHORT
// );
//ToastAndroid.show(`Widget Name: ${WidgetName}`, ToastAndroid.SHORT);
switch (widgetAction) {
case "WIDGET_ADDED":
case "WIDGET_UPDATE":

View File

@ -1,6 +1,6 @@
import { ScrollView, View, Animated, LayoutAnimation } from "react-native";
import React, { useEffect, useMemo, useState, useLayoutEffect } from "react";
import { useScrollHandlers } from "react-native-actions-sheet";
import { NativeViewGestureHandler } from "react-native-gesture-handler";
import { AS } from "../storageControl";
export const DynamicHeaderScrollView = (props) => {
@ -13,7 +13,7 @@ export const DynamicHeaderScrollView = (props) => {
topStickyContent,
styles,
from,
ScrollViewRef,
scrollHandlers,
} = props;
const [headerSize, setHeaderSize] = useState("default");
useLayoutEffect(() => {
@ -53,9 +53,7 @@ export const DynamicHeaderScrollView = (props) => {
const Scroll_Distance = Max_Header_Height - Min_Header_Height;
const scrollHandlers = actionSheetRef
? useScrollHandlers("scrollview-1", actionSheetRef)
: null;
const shotHeaderStyle = {
on: {
@ -110,6 +108,7 @@ export const DynamicHeaderScrollView = (props) => {
const [headerVisible, setHeaderVisible] = useState(false);
const onScroll = (event) => {
scrollHandlers.onScroll(event);
switch (headerSize) {
case "big":
setHeaderVisible(false);
@ -153,26 +152,31 @@ export const DynamicHeaderScrollView = (props) => {
{topStickyContent}
</Animated.View>
</View>
<ScrollView
{...scrollHandlers}
style={{ backgroundColor: "white", zIndex: 0 }}
stickyHeaderIndices={[1]}
scrollEventThrottle={16}
onScroll={onScroll}
ref={ScrollViewRef}
<NativeViewGestureHandler
simultaneousHandlers={scrollHandlers.simultaneousHandlers}
>
<View style={{ height: Scroll_Distance, flexDirection: "column" }} />
{topStickyContent && (
<View
style={{
paddingTop: Min_Header_Height + 40,
flexDirection: "column",
}}
index={1}
/>
)}
{children}
</ScrollView>
<ScrollView
nestedScrollEnabled
ref={scrollHandlers.ref}
onLayout={scrollHandlers.onLayout}
scrollEventThrottle={scrollHandlers.scrollEventThrottle}
style={{ backgroundColor: "white", zIndex: 0 }}
stickyHeaderIndices={[1]}
onScroll={onScroll}
>
<View style={{ height: Scroll_Distance, flexDirection: "column" }} />
{topStickyContent && (
<View
style={{
paddingTop: Min_Header_Height + 40,
flexDirection: "column",
}}
index={1}
/>
)}
{children}
</ScrollView>
</NativeViewGestureHandler>
</View>
);
};

View File

@ -0,0 +1,147 @@
import React, { useEffect, useState } from "react";
import { View, Text, TouchableOpacity, ScrollView, Image } from "react-native";
import { useNavigation } from "@react-navigation/native";
import { CheckBox } from "react-native-elements";
import { AS } from "../../storageControl";
import icons from "../../assets/icons/icons";
import app from "../../app.json";
import { ListItem } from "native-base";
import {
setAlternateAppIcon,
resetAppIcon,
getAppIconName,
supportsAlternateIcons,
} from "expo-alternate-app-icons";
import { widthPercentageToDP } from "react-native-responsive-screen";
export const LauncherIconSettings = ({ navigate }) => {
const { goBack } = useNavigation();
const [iconList, ] = useState(icons());
const [currentIcon, ] = useState(getAppIconName());
return (
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
<View style={{ flex: 1 }}>
<TouchableOpacity
onPress={goBack}
style={{
flexDirection: "column",
flex: 1,
}}
>
<View style={{ flex: 1 }} />
<Text
style={{
fontSize: 20,
fontWeight: "bold",
textAlign: "left",
textAlignVertical: "center",
color: "white",
padding: 10,
}}
>
設定
</Text>
<View style={{ flex: 1 }} />
</TouchableOpacity>
</View>
<Text
style={{
fontSize: 20,
fontWeight: "bold",
textAlign: "center",
color: "white",
padding: 10,
}}
>
アイコン設定
</Text>
<View style={{ flex: 1 }}></View>
</View>
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
{currentIcon ? (
<>
<Text
style={{
backgroundColor: "#DDDDDD",
}}
>
現在のアイコン:
{iconList.filter(({ id }) => id == currentIcon)[0].id}
</Text>
<View
style={{
flexDirection: "cokumn",
alignItems: "center",
justifyContent: "center",
backgroundColor: "#DDDDDD",
padding: 10,
}}
>
<Image
source={
iconList.filter(({ id }) => id == currentIcon)[0].icon
}
style={{
width: 50,
height: 50,
padding: 30,
borderWidth: 1,
borderRadius: 10,
borderColor: "white",
margin: 10,
backgroundColor: "white",
}}
/>
<Text>JR四国非公式アプリ</Text>
</View>
</>
) : (
<></>
)}
<View
style={{
flexDirection: "row",
flexWrap: "wrap",
alignContent: "center",
justifyContent: "center",
}}
>
{iconList.map(({ name, icon, id }) => {
return (
<TouchableOpacity
key={id}
style={{
margin: 10,
alignItems: "center",
justifyContent: "center",
width: widthPercentageToDP("30%"),
maxWidth: 60,
height: 100,
borderColor: "#999999",
borderWidth: id == currentIcon ? 2 : 0,
borderRadius: 10,
}}
onPress={() => {
setAlternateAppIcon(id)
.then((res) => {
alert(res);
})
.catch((err) => {
alert(err);
});
}}
>
<Image source={icon} style={{ width: 50, height: 50 }} />
<Text>{id}</Text>
</TouchableOpacity>
);
})}
</View>
</ScrollView>
</View>
);
};

View File

@ -120,106 +120,62 @@ export const SettingTopPage = ({
falseText={"リンクメニュー"}
trueText={"列車位置情報"}
/>
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
<SettingList
string="お気に入り登録の並び替え"
onPress={() =>
navigation.navigate("setting", { screen: "FavoriteSettings" })
}
>
<ListItem.Content>
<ListItem.Title>お気に入り登録の並び替え</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
/>
<SettingList
string={`通知設定${
expoPushToken == "" ? "(通知設定をオンにしてください)" : "(β)"
}`}
onPress={() =>
navigation.navigate("setting", { screen: "NotificationSettings" })
}
disabled={expoPushToken == ""}
>
<ListItem.Content>
<ListItem.Title>
通知設定
{expoPushToken == "" ? "(通知設定をオンにしてください)" : "(β)"}
</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
/>
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
<SettingList
string="レイアウト設定"
onPress={() =>
navigation.navigate("setting", { screen: "LayoutSettings" })
}
>
<ListItem.Content>
<ListItem.Title>レイアウト設定</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
/>
{Platform.OS === "android" ? (
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
<SettingList
string="ウィジェット設定"
onPress={() =>
navigation.navigate("setting", { screen: "WidgetSettings" })
}
>
<ListItem.Content>
<ListItem.Title>ウィジェット設定</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
/>
) : null}
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
<SettingList
string="アイコン設定"
onPress={() =>
navigation.navigate("setting", { screen: "LauncherIconSettings" })
}
/>
<SettingList
string="プライバシーポリシー"
onPress={() =>
Linking.openURL(
"https://nexcloud.haruk.in/sites/press-harukin/JRShikokuApps/policy"
)
}
>
<ListItem.Content>
<ListItem.Title>プライバシーポリシー</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
/>
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
<SettingList
string="開発情報"
onPress={() =>
Linking.openURL("https://nexcloud.haruk.in/s/2WFEN5oLPGtrRqT")
}
>
<ListItem.Content>
<ListItem.Title>開発情報</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
/>
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
<SettingList
string="運営Twitter"
onPress={() => Linking.openURL("https://twitter.com/Xprocess_main")}
>
<ListItem.Content>
<ListItem.Title>運営Twitter</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
/>
{/* <ListItem style={{ flexDirection: "row" }} onPress={() => testNFC()}>
<Text
@ -258,3 +214,20 @@ export const SettingTopPage = ({
</View>
);
};
const SettingList = ({ string, onPress, disabled }) => {
return (
<ListItem
activeScale={0.95}
Component={TouchableScale}
bottomDivider
onPress={onPress}
disabled={disabled}
>
<ListItem.Content>
<ListItem.Title>{string}</ListItem.Title>
</ListItem.Content>
<ListItem.Chevron />
</ListItem>
);
};

View File

@ -23,6 +23,7 @@ import { LayoutSettings } from "./LayoutSettings";
import { FavoriteSettings } from "./FavoriteSettings";
import { WidgetSettings } from "./WidgetSettings";
import { NotificationSettings } from "./NotificationSettings";
import { LauncherIconSettings } from "./LauncherIconSettings";
const Stack = createStackNavigator();
export default function Setting(props) {
@ -148,6 +149,18 @@ export default function Setting(props) {
>
{(props) => <WidgetSettings {...props} navigate={navigate} />}
</Stack.Screen>
<Stack.Screen
name="LauncherIconSettings"
options={{
gestureEnabled: true,
...TransitionPresets.SlideFromRightIOS,
cardOverlayEnabled: true,
headerTransparent: true,
headerShown: false,
}}
>
{(props) => <LauncherIconSettings {...props} navigate={navigate} />}
</Stack.Screen>
<Stack.Screen
name="FavoriteSettings"
options={{

View File

@ -35,6 +35,12 @@
},
"production5.0": {
"channel": "dmm"
},
"beta6.0": {
"channel": "ebookjapan"
},
"production6.0": {
"channel": "ebay"
}
},
"submit": {

View File

@ -63,6 +63,7 @@
"react-native-touchable-scale": "^2.2.0",
"react-native-vector-icons": "^10.2.0",
"react-native-view-shot": "~4.0.3",
"react-native-walkthrough-tooltip": "^1.6.0",
"react-native-webview": "13.12.5",
"typescript": "^5.3.0"
},

View File

@ -7014,6 +7014,11 @@ react-devtools-core@^5.3.1:
shell-quote "^1.6.1"
ws "^7"
react-fast-compare@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9"
integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==
react-freeze@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/react-freeze/-/react-freeze-1.0.3.tgz#5e3ca90e682fed1d73a7cb50c2c7402b3e85618d"
@ -7274,6 +7279,14 @@ react-native-view-shot@~4.0.3:
dependencies:
html2canvas "^1.4.1"
react-native-walkthrough-tooltip@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/react-native-walkthrough-tooltip/-/react-native-walkthrough-tooltip-1.6.0.tgz#a9b9196973d2fdef8f36bbcae57c93069cd9fb3e"
integrity sha512-8DHpcqsF+2VULYnKJCSZtllhlFUFiZcWCwOlw5RLkS451ElxPWJn9ShOFVZtkPMcwQAirq3SovumVM7Y/li0Fw==
dependencies:
prop-types "^15.6.1"
react-fast-compare "^2.0.4"
react-native-webview@13.12.5:
version "13.12.5"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.12.5.tgz#ed9eec1eda234d7cf18d329859b9bdebf7e258b6"