[Android] Header does not have left and right padding on Android
See original GitHub issueHi.
I’m using @react-navigation/native-stack
in my app, and I have an issue with Header on Android. When the header doesn’t show back button, the title is stuck to the left side of the screen without any padding.
The header right can be solved with CSS, but I couldn’t find a way to do the same with title on Android.
Thank you
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Listview : different padding for header & content - Stack Overflow
My trouble is that the header needs to have no padding whereas the existing lists already have a 20dp padding. It could setup...
Read more >FrameLayout - Android Developers
The size of the FrameLayout is the size of its largest child (plus padding), visible or not (if the FrameLayout's parent permits). Views...
Read more >overflow-x - CSS: Cascading Style Sheets - MDN Web Docs
The overflow-x CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, ...
Read more >Supporting safe areas | React Navigation
Navigation bar on Android. The area not overlapped by such items is referred to as "safe area". We try to apply proper insets...
Read more >padding | CSS-Tricks
If three values are declared, it is padding: [top] [left-and-right] [bottom]; . Any of the individual padding properties can be declared using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hi @kmagiera I’ve read the release commit list for version
2.2.0
and it says this fix should already be there, but that’s the version I’m using and I’m still having this inconsistency between Android and iOS.I’m using
<kbd> </kbd>react-native-screens/native-stack
for the Stack and@react-navigation/native
hooks to show the header on screens I wantskip
orback
buttons:<kbd> </kbd>
maybe my approach isn’t correct? can you give me some insight on this? 😬
thanks!
@sallar Yes, pretty sure it’s related to this PR - https://github.com/software-mansion/react-native-screens/pull/289/files