orci
December 16, 2021, 12:22am
1
I need to change the color of overscroll effect on android. I searched through docs and stackoverflow etc. but didn’t found any clue. Is there any solutions?
I would like to know if this is possible in a managed workflow?
FYI:
Here is an article on how to do in in a the bare workflow:
https://github.com/facebook/react-native/issues/28973
wodin
January 2, 2023, 10:02pm
3
Yes, try this. I wrote it a while ago and haven’t tried it since then, but it is pretty simple.
"plugins": [
[
"./plugins/withReactNativeHce",
{
"appIds": [
"D2760000850101",
"F0010203040506",
"F0394148148100"
]
}
],
[
"./plugins/withAndroidColorEdgeEffect",
{
"color": "#123456"
}
],
[
"./plugins/withAndroidApplicationAttributes",
{
"android:usesCleartextTraffic": false
const { withAndroidStyles, withPlugins } = require("@expo/config-plugins");
function addAndroidColorEdgeEffectToStyles(androidStyles, color) {
// Add `<item name="android:colorEdgeEffect">...</item>` to the styles.xml
let resources = androidStyles["resources"];
if (!resources) {
resources = {
$: {
"xmlns:tools": "http://schemas.android.com/tools",
},
};
androidStyles["resources"] = resources;
}
let styles = resources["style"];
if (!Array.isArray(styles)) {
styles = [];
resources["style"] = styles;
}
This file has been truncated. show original