423 Commits

Author SHA1 Message Date
Eric Kuck 894601700d Fixed potential ConcurrentModificationExceptions if developers added or removed routers during lifecycle callbacks 2018-05-29 15:05:36 -05:00
Eric Kuck d72951eb04 Fixed up lint calls and related tests 2018-05-29 14:43:16 -05:00
Eric Kuck ca3ec3ac12 Fixed false positives for new UAST lint checks 2018-05-29 12:13:51 -05:00
Paul Woitaschek 5ce857bb24 Dependency update & Migrate Lint to UAST (#433)
* Use Android Sdk 27

* Updated the unmock plugin and use the default configuration.

* Removed the explicit buildTools and use the one bundled with the plugin.

* Updated the support library, butterknife, leakCanary, rxjava 1 & 2,
rxlifecycle 1 & 2, junit and robolectric.

* Migrated the lint checks to UAST.

* Rename the UClass "declaration" to "field" to be consistent to the
other check and the default name.

* Moved the evaluator of the ControllerIssueDetector to the handler too.
2018-05-29 11:31:32 -05:00
Eric Kuck f6512d3e1c Fixed build 2018-05-29 11:14:28 -05:00
Eric Kuck 52f095d945 Codestyle updates 2018-05-25 14:45:58 -05:00
Stephan Schuster 91da937d4f Improved lifecycle integration of Conductor and Architecture Components (#383)
Previous mapping was:
- () -> ON_CREATE -> CREATED
- preCreateView -> ON_START -> STARTED
- preAttach -> ON_RESUME -> RESUMED
- preDetach -> ON_PAUSE -> STARTED
- preDestroyView -> ON_STOP -> CREATED
- preDestroy -> ON_DESTROY -> DESTROYED

New mapping is:
- () -> INITIALIZED
- postContextAvailable -> ON_CREATE -> CREATED
- postCreateView -> ON_START -> STARTED
- postAttach -> ON_RESUME -> RESUMED
- preDetach -> ON_PAUSE -> STARTED
- preDestroyView -> ON_STOP -> CREATED
- preContextUnavailable -> // do nothing
- preDestroy -> ON_DESTROY -> DESTROYED

Change-Id: I9f65480018dc1204dc89a8065fa7c7f554ad7dd2
2018-05-25 14:41:06 -05:00
Eric Kuck 9e3095957c Autodispose dependency update, fixed build 2018-05-25 14:38:23 -05:00
Eric Kuck fac44b74e9 build.gradle updates 2018-05-25 13:26:48 -05:00
Daniel Stout ed6ba3a5eb Fix ConcurrentModificationException thrown in Router.popController (#406) 2018-05-25 13:15:25 -05:00
Paul Woitaschek df70e983be Removed synthetic accessors (#347)
* Removed synthetic accessors.

* Upon copying child routers, init the list with the new size and use
addAll.

* Initialize some lists with an appropriate initial capacity.

* Don't wrap methods.
2017-10-09 14:55:35 -05:00
Stefan M 4d28dcefac Styles snapshot section (#364)
* Add missing curly braces
* Make snapshot bold and remove double point
* Fix typo
2017-10-09 11:46:22 -05:00
Eric Kuck 8ab528a566 Fixed ordering of onContextAvailable calls when setting the backstack 2017-10-03 16:42:23 -05:00
Eric Kuck 9bbf050cd2 setBackstack now delays destroying old controllers until after the change handler that removes them has completed 2017-08-04 10:59:19 -05:00
Eric Kuck 5a545aca20 Fixes removeAllExceptVisibleAndUnowned when there is more than 1 View that needs to be removed. Fixes #336 2017-08-01 16:13:40 -05:00
inorichi 0987b311d9 Only show options menu of the active item in a ViewPager (#335) 2017-07-28 10:54:12 -05:00
Eric Kuck ff105abf12 Fixes waitOnSharedElementNamed 2017-07-27 13:42:55 -05:00
Gustavo Pagani 422ca7a544 Expose parent constructor with Bundle as parameter (#328)
* Expose constructor with Bundle as parameter
* Add Nullable annotation to Bundle parameter
2017-07-21 11:58:20 -05:00
Eric Kuck 09df937c88 Fixes evaluation of isPush for several cases of setBackstack. Fixes #327 2017-07-17 14:00:11 -05:00
Eric Kuck ec8ac2a371 setBackstack will now make context available to all new controllers as soon as possible 2017-07-17 11:56:41 -05:00
Eric Kuck 66b0458c0e Fixed potential ConcurrentModificationException when listeners are removed during change handler events 2017-07-14 13:10:05 -05:00
Eric Kuck bd0cd361f2 Readme update 2017-07-11 14:54:19 -05:00
Eric Kuck 60c237bf82 Travis yml update 2017-07-10 17:08:03 -05:00
Eric Kuck bae8a16d8c Added SharedElementTransitionChangeHandler, which handles transitions much more robustly 2017-07-10 16:02:51 -05:00
Eric Kuck 55e8aebb87 Version bump 2.1.4 2017-07-05 13:02:07 -05:00
Eric Kuck 272c507f91 Args are now restored to a controller after process death even if there is only a no-arg constructor. Fixes #313 2017-07-05 10:26:56 -05:00
Hannes Struß 8e945cde52 Fixes ControllerScopeProvider.from return type (#319) 2017-06-25 14:23:28 -05:00
Eric Kuck c17287db67 shouldShowRequestPermissionRationale now returns the correct result. Fixes #317 2017-06-24 12:29:35 -05:00
Eric Kuck 625a3fcfd6 Fixes fade change handler animation when popping and removesFromViewOnPush is false 2017-06-21 17:11:37 -05:00
Eric Kuck dd2ecf2f83 onContextUnavailable now correctly called before onDestroy even if the host Activity is still around 2017-06-16 08:37:21 -05:00
Eric Kuck 0efc2b3daf Fixed rx lifecycle handling for subscriptions in the onContextAvailable callback 2017-06-15 10:27:05 -05:00
Eric Kuck 4b4c3a82b8 Added context available/unavailable to lifecycle listeners. Now supported by all rx lifecycle modules as well. 2017-06-12 12:14:18 -05:00
Eric Kuck 7d0599fc5d Fixed tests 2017-06-02 16:15:37 -05:00
Eric Kuck 0adea89d34 Arch components lifecycle module now labeled as an alpha 2017-06-02 15:55:22 -05:00
Eric Kuck 044363517c Added modules for Autodispose and architecture components's Lifecycle
Cleaned up the demo and directory structure a bit now that there are so many external modules
2017-06-02 15:47:56 -05:00
Eric Kuck a2f11d5d51 The final controller popped in a router now has onDestroy properly called in it, even if the pop change handler is a no-op. 2017-05-26 16:09:56 -05:00
Eric Kuck bcd8ddbfb5 - Added ability to query current controller lifecycle state (needed for things like Google's Lifecycle and Uber's AutoDispose)
- Added onContextAvailable and onContextUnavailable callback to controllers (helpful for dependency injection)
2017-05-26 13:42:29 -05:00
Eric Kuck 479e3f0474 Pop changes that happen rapidly are now properly immediately completed instead of aborted. 2017-05-26 07:01:24 -05:00
Eric Kuck c298ca905c Fixes leaked activity introduced in e64fe1c610 2017-05-26 06:14:05 -05:00
Eric Kuck aebb19effa Fixes attach state management when a controller is pushed while the Activity is paused. (Fixes #303) 2017-05-24 03:05:42 -05:00
Eric Kuck e64fe1c610 Fixes issue when immediately creating two routers in the same Activity caused by the async nature of fragment transactions (fixes #299) 2017-05-24 03:01:36 -05:00
Frieder Bluemle 2357297531 Project updates (#264)
* Update Gradle wrapper to 3.5

* Fix whitespace errors

* Remove executable bit from regular files

* Fix DrawableRes annotation

* Update Android Gradle plugin to 2.3.2

* Update build tools to 25.0.3

* Do not ignore Lint errors

* Replace android-apt with annotationProcessor

* Update unmock to 0.6.0

* Update support libs to 25.3.1
2017-05-18 10:35:30 -05:00
Eric Kuck 926f7da6ce Now ensures that parent controller is restored after process death (fixes #300) 2017-05-18 10:29:12 -05:00
Eric Kuck d260dfcf12 Change handlers that occur after a deferred change handler are now deferred until the preceding handler completes to ensure correct ordering. Handlers will only be deferred when the containing view isn’t yet fully attached and they could cause a NPE in ViewGroup.java. 2017-05-18 07:36:02 -05:00
Eric Kuck a84b2fb4c4 Reverts 81a499d and attempts to fix #274, #285, and #287 in a more reliable way. 2017-05-10 12:19:00 +03:00
Eric Kuck 6aca3f578a Fixes a case that caused the incorrect change handler to execute when setting the backstack (fixes #286) 2017-05-10 11:37:10 +03:00
Eric Kuck 45ab54b5d7 Fixes issue where calling setBackstack repeatedly could result in a situation where multiple ControllerChangeHandlers are executing at the same time and interfering with each others states (#263) 2017-05-04 11:26:18 -05:00
Eric Kuck ca84419e0c Version bump 2.1.3 2017-05-03 16:28:23 -05:00
Eric Kuck a04dec7ec1 Fixes views never attaching if the host activity is stopped before inflation. Fixes #273 2017-05-03 16:03:58 -05:00
Eric Kuck 81a499d121 Now handles sequences of immediate pushing and popping of controllers much better. Also guards against NPEs due to popping a controller during onAttach. Fixes #274 2017-05-03 14:42:17 -05:00