UI incorrect on android when navigate back and forth
Closed this issue · 5 comments
I found this issue in android when I try to navigate from my first page to page that contain UnityView.
For the first time, everything looks fine. Unity started normally and UI draw correctly. but when I navigate back to normal page and navigate to unity page again. Ui draw incorrect. Some of my button missing but still can be press. Also when back from unity for the second time my UI has been block with black screen. I try to solve in whole day still not working.
This not happen on IOS at all.
I will be very graceful if you can take a look for me.
Sorry for my English. I'm not English native speaker.
My page before unity page when back from unity in second time
I already try
<UnityView style={{ position: 'absolute', left: 0, right: 0, top: 1, bottom: 1 }} />
Still didn't work.
OK. I think I found a workaround for this issue.
Here is what I do.
I changed my code from this
<Container>
<Content style={styles.container} contentContainerStyle={styles.contentContainer} scrollEnabled={false}>
<UnityView style={{ position: 'absolute', left: 0, right: 0, top: 1, bottom: 1 }}/>
<View style={{ flex: 1 }}>
....My UI....
</View>
</Content>
</Container>
To
<Container>
<Content style={styles.container} contentContainerStyle={styles.contentContainer} scrollEnabled={false}>
<UnityView style={{ position: 'absolute', left: 0, right: 0, top: 1, bottom: 1 }}/>
<View style={{ flex: 1, backgroundColor: '#FFFFFF00' }}>
....My UI....
</View>
</Content>
</Container>
I just add white with 0 alpha background and make it full screen and it work.
I try transparent but not working.
I have this same issue when navigating backward from a unity view into the application on android. The fix mentioned here doesn't work for me unfortunately. I'm trying to force a redraw at this point.
@ddaeschler did you find any fix for the issue