Skip to content

Commit

Permalink
Fix navigation view menu sub header margin
Browse files Browse the repository at this point in the history
Improve support for RTL layout.
  • Loading branch information
pranavpandey committed Jul 22, 2022
1 parent 2291a55 commit a795b2e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,11 @@ public static void setSubHeaderColor(@Nullable NavigationView view, @ColorInt in

if (presenter != null) {
presenter.setSubheaderColor(ColorStateList.valueOf(color));

// Fix margin for RTL layout.
if (presenter.getSubheaderInsetEnd() <= 0) {
presenter.setSubheaderInsetEnd(presenter.getSubheaderInsetStart());
}
}
} catch (Exception ignored) {
}
Expand Down

0 comments on commit a795b2e

Please sign in to comment.