UI Style Change: Reduce Spacing in Account Screen Profile Header
Last Updated: 16/07/2026
Type: UI Layout Fix — Account Screen Padding
Screen: Account / Profile Screen (AccountScreen)
Severity: 🟢 Low — Layout formatting to optimize vertical screen space
Feedback Screenshot:
1. Identified Spacing Issues
In the top header card of the Account Screen:
- Header Top Padding: There is excessive blank vertical space above the user avatar, pushing the profile card too far down.
- Profile Info Bottom Padding: The gap below the membership tier and points display (
Hạng thành viên | Point khả dụng) is too tall, delaying the start of the utilities menu cards (Tiện íchandDành cho bạn).
2. Style Adjustments (React Native)
To optimize vertical screen estate and prevent unnecessary scrolling on smaller screens:
2.1 Adjusting Header Padding
- Action: Reduce the top padding of the header container. If using
SafeAreaViewor status bar padding, ensure no additional hardcoded paddings are stacked. - Specification: Reduce top padding from e.g.,
40pxor50pxdown to20px(orstatusBarHeight + 16px).
2.2 Adjusting Bottom Margins of Profile Info
- Action: Reduce the bottom margin or padding of the membership info container before the scrollable menu list starts.
- Specification: Set bottom margin/padding to a maximum of
12pxor16px(was likely32pxor more).
3. Style Code Spec
3.1 Before (Excessive Spacing Styles)
const styles = StyleSheet.create({
headerContainer: {
backgroundColor: '#6A4F2A', // Brown background
paddingTop: 50, // ❌ Too large top padding
paddingBottom: 24,
alignItems: 'center',
},
avatarContainer: {
marginBottom: 12,
},
membershipRow: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 16,
marginBottom: 32, // ❌ Too large bottom spacing before next section
},
menuListContainer: {
marginTop: 16,
paddingHorizontal: 16,
}
});
3.2 After (Compact & Optimized Styles)
import { Platform, StatusBar } from 'react-native';
const STATUS_BAR_HEIGHT = Platform.OS === 'ios' ? 20 : StatusBar.currentHeight || 0;
const styles = StyleSheet.create({
headerContainer: {
backgroundColor: '#6A4F2A',
// ✅ Keep layout safe but tight: safe top offset + small padding
paddingTop: STATUS_BAR_HEIGHT + 16,
paddingBottom: 16,
alignItems: 'center',
},
avatarContainer: {
marginBottom: 8,
},
membershipRow: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 12,
marginBottom: 16, // ✅ Reduced gap to pull menu list upward
},
menuListContainer: {
marginTop: 12, // Pulled closer to the brown header card
paddingHorizontal: 16,
}
});
Technical Checklist
- Locate the view styling rules in
AccountScreen.tsx(typically under/screens/account/or/screens/profile/). - Inspect the main header card component (
headerContainerstyle rule). Reduce the hardcodedpaddingTopto useStatusBar.currentHeightor a lower base value like16. - Inspect the bottom margin of the membership info row (
membershipRowstyle rule) and reducemarginBottomto16or less. - Verify the scroll view behaves correctly without clipped components.
- Test layout on:
- Devices with status bar notches (e.g. iPhone 14/15) to verify safe top spacing.
- Devices with physical Home buttons (e.g. iPhone SE) to verify no empty top margins.