simonpoole / OpeningHoursFragment

Android UI element for displaying and editing an opening hours value
MIT License
9 stars 2 forks source link

Crash in template selector #31

Closed simonpoole closed 5 years ago

simonpoole commented 5 years ago

Rotating the device while in the template selector will crash vespucci (not the test app) with

java.lang.IllegalStateException: Fragment OpeningHoursFragment{2120f77} not attached to a context. at android.support.v4.app.Fragment.requireContext(Fragment.java:614) at android.support.v4.app.Fragment.getResources(Fragment.java:678) at ch.poole.openinghoursfragment.OpeningHoursFragment.valueToEntry(OpeningHoursFragment.java:3315)

in the call to getResources().

simonpoole commented 5 years ago

Crash fixed in https://github.com/simonpoole/OpeningHoursFragment/commit/cbf2828a86cd09cc2ef8d073843b017581646c6f