mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-16 09:23:07 +01:00
Try fix android issue for player seelct
This commit is contained in:
3
app.json
3
app.json
@@ -105,7 +105,8 @@
|
|||||||
"react-native-edge-to-edge",
|
"react-native-edge-to-edge",
|
||||||
{ "android": { "parentTheme": "Material3" } }
|
{ "android": { "parentTheme": "Material3" } }
|
||||||
],
|
],
|
||||||
["react-native-bottom-tabs"]
|
["react-native-bottom-tabs"],
|
||||||
|
["plugins/withChangeNativeAndroidTextToWhite.js"]
|
||||||
],
|
],
|
||||||
"experiments": {
|
"experiments": {
|
||||||
"typedRoutes": true
|
"typedRoutes": true
|
||||||
|
|||||||
30
plugins/withChangeNativeAndroidTextToWhite.js
Normal file
30
plugins/withChangeNativeAndroidTextToWhite.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
const { readFileSync, writeFileSync } = require("fs");
|
||||||
|
const { join } = require("path");
|
||||||
|
const { withDangerousMod } = require("@expo/config-plugins");
|
||||||
|
|
||||||
|
const withChangeNativeAndroidTextToWhite = (expoConfig) =>
|
||||||
|
withDangerousMod(expoConfig, [
|
||||||
|
"android",
|
||||||
|
(modConfig) => {
|
||||||
|
if (modConfig.modRequest.platform === "android") {
|
||||||
|
const stylesXmlPath = join(
|
||||||
|
modConfig.modRequest.platformProjectRoot,
|
||||||
|
"app",
|
||||||
|
"src",
|
||||||
|
"main",
|
||||||
|
"res",
|
||||||
|
"values",
|
||||||
|
"styles.xml"
|
||||||
|
);
|
||||||
|
|
||||||
|
let stylesXml = readFileSync(stylesXmlPath, "utf8");
|
||||||
|
|
||||||
|
stylesXml = stylesXml.replace(/@android:color\/black/g, "@android:color/white");
|
||||||
|
|
||||||
|
writeFileSync(stylesXmlPath, stylesXml, { encoding: "utf8" });
|
||||||
|
}
|
||||||
|
return modConfig;
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
module.exports = withChangeNativeAndroidTextToWhite;
|
||||||
Reference in New Issue
Block a user