Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App's welcome screen showing blank screen (text is missing after orientation change) #304

Closed
Hashik-Donthineni opened this issue Feb 27, 2020 · 13 comments
Labels
PLEASE TEST please test and post feedback

Comments

@Hashik-Donthineni
Copy link
Contributor

The welcome screen, when you open the app for the first time, is showing a blank screen when you rotate the device (change orientation).
Reference Image (All the slides are same):
Screenshot_20200227-141135

@bitmold
Copy link
Collaborator

bitmold commented Apr 25, 2020

I think this can be closed with #305 being merged

@n8fr8 n8fr8 added this to the Current Sprint milestone Apr 26, 2020
@n8fr8 n8fr8 added the PLEASE TEST please test and post feedback label Apr 26, 2020
@bitmold
Copy link
Collaborator

bitmold commented Apr 26, 2020

I've tested this and text is no longer lost, but upon rotation you are always taken back to the first slide. I'm working on a fix for this right now

@bitmold
Copy link
Collaborator

bitmold commented Jul 28, 2020

Both of these issues seem to still exist or were reintroduced :(

@Hashik-Donthineni
Copy link
Contributor Author

Hashik-Donthineni commented Jul 28, 2020

Hey @bitmold The text is going away again (disappearing)? and what is the second issue you were referring to?

@bitmold
Copy link
Collaborator

bitmold commented Jul 28, 2020

Yes, right now the onboarding flow will just close:
close

I've been tinkering with this flow, and we don't actually need to do any complicated work to preserve activity state on rotation. You get the expected results by setting the android:configChanges property in the manifest for the OnboardingActivity:

        <activity
            android:name=".ui.onboarding.OnboardingActivity"
            android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" />

This tells the system to not destroy/create a new activity when the device is rotated and it gives us the desired results we want. In fact, it lets us safely delete a bunch of code we have written!

@bitmold
Copy link
Collaborator

bitmold commented Jul 28, 2020

@Hashik-Donthineni if you'd like please take a look at #373

@Hashik-Donthineni
Copy link
Contributor Author

Okay! thank you for working on this. But it's weird it reoccurring, It's supposed to work, are there recent complaints about this @bitmold ?

@bitmold
Copy link
Collaborator

bitmold commented Jul 28, 2020

Not that I am aware of. Today/yesterday I've been going through older issues that are still open and trying to close out as many as possible. When revisiting this one I tested the code off of the master branch and found that this issue (or at least an issue similar to the one you initially reported with this ticket) still existed.

@Hashik-Donthineni
Copy link
Contributor Author

Can you please confirm that it's not working by testing? It's just that, I am doing everything that can be done to save the state, it's not possible to lose the state. What do you think?

@bitmold
Copy link
Collaborator

bitmold commented Jul 28, 2020

I did confirm by testing, I posted a gif of the onboarding flow crashing after rotation and on April 26th I tested the code at that point in time and noticed that the slide position would be incorrectly set after rotation

@Hashik-Donthineni
Copy link
Contributor Author

Hashik-Donthineni commented Jul 28, 2020

Ah, yeah. It's not related to the restore I just couldn't find a way to reset the slide number. There is no way to manually set the slide from the API as far as I can remember, I tried.

@bitmold
Copy link
Collaborator

bitmold commented Jul 28, 2020

Anyway, that issue aside, the onboarding slids would still break after rotation. Feel free to test the code on master right now to verify this yourself

@Hashik-Donthineni
Copy link
Contributor Author

Hashik-Donthineni commented Jul 28, 2020

"Yes, right now the onboarding flow will just close:"
I just saw this, the GIF didn't load earlier. So I guess we can drop this since you are handling this at #373

Update: Yup, it's happening as shown in the GIF.

bitmold added a commit that referenced this issue Jul 28, 2020
Fixes #304 Onboarding text and slide position are preserved on rotation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PLEASE TEST please test and post feedback
Projects
None yet
Development

No branches or pull requests

3 participants