Skip to content

Commit

Permalink
Fix logo cut-off in navigation drawer on some devices (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
CNugteren authored Feb 11, 2025
1 parent 67c266b commit 32a9f71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions app/src/main/res/layout/nav_header_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<ImageView
android:id="@+id/imageView"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/nav_header_desc"
android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@mipmap/ic_launcher_round" />
Expand All @@ -24,15 +24,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:paddingStart="7dp"
android:text="@string/nav_header_title"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="7dp"
android:text="@string/nav_header_subtitle" />

</LinearLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="nav_header_vertical_spacing">8dp</dimen>
<dimen name="nav_header_height">176dp</dimen>
<!--- Increased by 30dp to fit the Pixel 5 (and likely other devices) -->
<dimen name="nav_header_height">206dp</dimen>
</resources>

0 comments on commit 32a9f71

Please sign in to comment.