BeksOmega / looping-layout

A looping LayoutManager for the Android RecyclerView.
Apache License 2.0
274 stars 16 forks source link

fix: Fixed backgrounding and saving state. #28

Closed BeksOmega closed 4 years ago

BeksOmega commented 4 years ago

:clap: Resolves

No issue number available.

The LayoutManager was not being properly re-laid out after being backgrounded and then brought back to the foreground. That is now fixed.

This was happening because the LayoutRequest did not realize it was properly initialized, so accessing its properties would throw errors, breaking things.

:star2: Description

Sets the LayoutRequest's hasBeenIntiailzed property to true inside the constructor if all necessary components have been passed.

:bug: Testing

  1. Scrolled the recycler.
  2. Backgrounded the test app.
  3. Selected another app.
  4. Foregrounded the test app.
  5. Observed how the layout was saved correctly.

Tested for all orientations.

:thought_balloon: Other info

Related to #24