question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android (scene) background color

See original GitHub issue

Hi! As always, it’s so pleasant using your navigation library. This time a come w/ a couple of requests. This is for Android, next for iOS. I could manage to help w/ a PR if you let me know some guidelines in how to do it, eg how do you try things before release, because I’ve touching sources under node_modules and obviously it’s not the best approach!

Anyway, I have an app w/ dark background. I noticed on Android that there’s a flash-y feeling just before all the screen is rendered, caused because the default background color for everything in RN Android is white. I tried the underlayColor prop but no success. After debugging with Flipper layout inspector I saw that changing the opacity of SceneView to zero, the background color from the stack underlayColor is there. First I tried to add this to. SceneViewManager:

@ReactProp(name = "underlayColor", customType = "Color", defaultInt = Integer.MAX_VALUE)
public void setUnderlayColor(SceneView view, int underlayColor) {
    view.setBackgroundColor(underlayColor);
}

It doesn’t work yet because I guess I need to change things on js land… btw, I preferred ask here before to check out how do you see this…

Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:43 (42 by maintainers)

github_iconTop GitHub Comments

2reactions
iamyellowcommented, Sep 9, 2022

btw, how cool is this… not only your lib is amazing, you’re so responsive, kind and always helping! we’re making and app that is going to be great, I can feel it! and people will know the nav library behind.

1reaction
iamyellowcommented, Sep 10, 2022

sounds crazy good!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Animate change of view background color on Android
You can use new Property Animation Api for color animation: int colorFrom = getResources().getColor(R.color.red); int colorTo = getResources().
Read more >
Background Color Transition Animation in Android
Once such animation is color transition and in this article, we shall implement a color-changing transition to the background in Android.
Read more >
Color state list resource | Android Developers
A ColorStateList is an object you can define in XML that you can apply as a color, but will actually change colors, depending...
Read more >
Сan not make a white background on SceneView #251 - GitHub
OK the issue is that Sceneform uses a color to apply tone mapping to the rendered scene. This makes the white be slightly...
Read more >
Scene background color code - Google Groups
Convert an Android decimal color to its hexadecimal representation in aRGB format. -16776961 (opaque blue) = ff0000ff. A1: Variable ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found