Skip to content

Commit a795b2e

Browse files
committed
Fix navigation view menu sub header margin
Improve support for RTL layout.
1 parent 2291a55 commit a795b2e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dynamic-support/src/main/java/com/pranavpandey/android/dynamic/support/util/DynamicScrollUtils.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,11 @@ public static void setSubHeaderColor(@Nullable NavigationView view, @ColorInt in
792792

793793
if (presenter != null) {
794794
presenter.setSubheaderColor(ColorStateList.valueOf(color));
795+
796+
// Fix margin for RTL layout.
797+
if (presenter.getSubheaderInsetEnd() <= 0) {
798+
presenter.setSubheaderInsetEnd(presenter.getSubheaderInsetStart());
799+
}
795800
}
796801
} catch (Exception ignored) {
797802
}

0 commit comments

Comments
 (0)