Skip to content

Commit af7d09a

Browse files
imhappidsn5ft
authored andcommittedAug 9, 2023
[Catalog] Fix fullscreen vertical carousel to use vertical dividers
resolves #3500 PiperOrigin-RevId: 554496440
1 parent 6b897c6 commit af7d09a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎catalog/java/io/material/catalog/carousel/FullScreenStrategyDemoFragment.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
/** A fragment that displays the fullscreen variant of the Carousel. */
4343
public class FullScreenStrategyDemoFragment extends DemoFragment {
4444

45-
private MaterialDividerItemDecoration horizontalDivider;
45+
private MaterialDividerItemDecoration verticalDivider;
4646
private BottomSheetDialog bottomSheetDialog;
4747

4848
@NonNull
@@ -65,9 +65,9 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle bundle) {
6565
// Opt in to perform swipe to dismiss animation when dismissing bottom sheet dialog.
6666
bottomSheetDialog.setDismissWithAnimation(true);
6767

68-
horizontalDivider =
68+
verticalDivider =
6969
new MaterialDividerItemDecoration(
70-
requireContext(), MaterialDividerItemDecoration.HORIZONTAL);
70+
requireContext(), MaterialDividerItemDecoration.VERTICAL);
7171

7272
Button showBottomSheetButton = view.findViewById(R.id.show_bottomsheet_button);
7373
showBottomSheetButton.setOnClickListener(new OnClickListener() {
@@ -107,9 +107,9 @@ public void onClick(View v) {
107107
drawDividers.setOnCheckedChangeListener(
108108
(buttonView, isChecked) -> {
109109
if (isChecked) {
110-
fullscreenRecyclerView.addItemDecoration(horizontalDivider);
110+
fullscreenRecyclerView.addItemDecoration(verticalDivider);
111111
} else {
112-
fullscreenRecyclerView.removeItemDecoration(horizontalDivider);
112+
fullscreenRecyclerView.removeItemDecoration(verticalDivider);
113113
}
114114
});
115115

0 commit comments

Comments
 (0)
Please sign in to comment.