Skip to content

Commit 42a19ab

Browse files
raajkumarshunterstich
authored andcommitted
[Navigation Rail] Fixed issue that caused destination views to be smaller than the rail width.
PiperOrigin-RevId: 356584209
1 parent 25bf03e commit 42a19ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/java/com/google/android/material/navigationrail/NavigationRailMenuView.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.android.material.navigationrail;
1818

19+
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
1920
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
2021
import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP;
2122
import static com.google.android.material.navigationrail.NavigationRailView.DEFAULT_MENU_GRAVITY;
@@ -37,7 +38,7 @@
3738
public class NavigationRailMenuView extends NavigationBarMenuView {
3839

3940
private final FrameLayout.LayoutParams layoutParams =
40-
new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
41+
new FrameLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT);
4142

4243
public NavigationRailMenuView(@NonNull Context context) {
4344
super(context);

0 commit comments

Comments
 (0)