Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Android): center headerTitleAlign below Android API 29 (#2439)
## Description This PR intents to fix `headerTitleAlign: 'center'` breaking layout on android API <= 29. I found changes added in #2332, which fixed a related toolbar problem on android API <= 29, affect the correct layout of the centered title. The `EXACTLY` [MeasureSpec](https://developer.android.com/reference/android/view/View.MeasureSpec) causes the title not to obtain as much space as it needs. Fortunately changing the spec to `AT_MOST` in the custom `layoutCallback` fixes the issue without introducing regression. I also included a check for the current `softInputMode` to abandon the action if it is not set to `adjustPan`. Fixes #2435 ## Changes - updated `Test2332.tsx` repro - changed measureSpec used in `layoutCallback` - added `softInputMode` check ## Screenshots / GIFs | Before #2332 | Before | After | | --- | --- | --- | | ![Screenshot_20241024_114026](https://github.com/user-attachments/assets/58cd349c-dd26-47ae-b05e-a391f6573672) | ![Screenshot_20241024_113943](https://github.com/user-attachments/assets/902fc554-ebfd-4bd3-81a0-c0fc70bd038f) | ![Screenshot_20241024_113853](https://github.com/user-attachments/assets/b60c0e2f-e3a2-4921-bde9-55750bdb617c) | ## Test code and steps to reproduce - use `Test2332.tsx` repro ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
- Loading branch information