Skip to content

Commit

Permalink
[Catalog] Fix fullscreen vertical carousel to use vertical dividers
Browse files Browse the repository at this point in the history
resolves #3500

PiperOrigin-RevId: 554496440
  • Loading branch information
imhappi authored and dsn5ft committed Aug 9, 2023
1 parent 6b897c6 commit af7d09a
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -42,7 +42,7 @@
/** A fragment that displays the fullscreen variant of the Carousel. */
public class FullScreenStrategyDemoFragment extends DemoFragment {

private MaterialDividerItemDecoration horizontalDivider;
private MaterialDividerItemDecoration verticalDivider;
private BottomSheetDialog bottomSheetDialog;

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

horizontalDivider =
verticalDivider =
new MaterialDividerItemDecoration(
requireContext(), MaterialDividerItemDecoration.HORIZONTAL);
requireContext(), MaterialDividerItemDecoration.VERTICAL);

Button showBottomSheetButton = view.findViewById(R.id.show_bottomsheet_button);
showBottomSheetButton.setOnClickListener(new OnClickListener() {
Expand Down Expand Up @@ -107,9 +107,9 @@ public void onClick(View v) {
drawDividers.setOnCheckedChangeListener(
(buttonView, isChecked) -> {
if (isChecked) {
fullscreenRecyclerView.addItemDecoration(horizontalDivider);
fullscreenRecyclerView.addItemDecoration(verticalDivider);
} else {
fullscreenRecyclerView.removeItemDecoration(horizontalDivider);
fullscreenRecyclerView.removeItemDecoration(verticalDivider);
}
});

Expand Down

0 comments on commit af7d09a

Please sign in to comment.