Add support for AppCompat ver. 1.2.0 #38
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #23 and #35.
Increased AppCompat version to 1.2.0 and adjusted the context wrapping based on changes described in this answer.
Changes
Instead of the old approach with override
attachBaseContext
from Activity - declarePhilologyAppCompatDelegateHolder
in BaseActivity and supply the right delegate forandroidx.appcompat.app.AppCompatActivity#getDelegate
method:The wrapped context will be reused inside activity on each
getDelegate
call.Note:
⚠️ I've pinpointed CircleCi image to the latest successful docker image build before Update Java from v8 to v11. (#500) since it's incompatible with current
Robolectric
versionHow to test
Philology
should replace the text in the sample app based on the device locale.