Skip to content

Hide preview button doesn't work on Android (works only on iOS) #224

Open
@imamabdulazis

Description

@imamabdulazis

Description

I am using @baronha/react-native-multiple-image-picker and trying to hide the preview button on Android using isHiddenPreviewButton: true. However, the button is still visible on Android, while it works as expected on iOS.

Expected Behavior

  • The preview button should be hidden on Android when isHiddenPreviewButton is set to true.
  • It should work consistently across both platforms.

Actual Behavior

  • On Android, the preview button remains visible even when isHiddenPreviewButton: true and isPreview: false is set in the config.
  • On iOS, the preview button is correctly hidden.

Configuration

import { Config } from '@baronha/react-native-multiple-image-picker';

export const mediaPickerConfig: Config = {
  maxFileSize: 10000000, // 10MB
  maxSelect: 10,
  maxVideo: 10,
  primaryColor: '#2365E9',
  backgroundDark: '#2f2f2f',
  numberOfColumn: 4,
  mediaType: 'all',
  selectBoxStyle: 'tick',
  selectMode: 'multiple',
  theme: 'dark',
  isPreview: false,  // Doesn't work on Android
  isShowPreviewList: false,
  allowHapticTouchPreview: false,
  allowSwipeToSelect: true,
  isHiddenPreviewButton: true, // Doesn't work on Android
  presentation: 'formSheet',
};

Steps to Reproduce

  • Configure @baronha/react-native-multiple-image-picker with the above settings.
  • Open the media picker on an Android device.
  • Observe that the preview button is still visible.

Environment

  • Package Version: 2.2.0
  • React Native Version: 0.75.3
  • Android Version: 15.0 | Emulator Pixel 7 Pro
  • iOS Version (for reference): 18.0

Additional Notes

  • If there's an alternative way to hide the preview button on Android, please advise. Thank you!

Screen.Recording.2025-02-24.at.8.58.49.PM.mov
Screen.Recording.2025-02-24.at.8.46.43.PM.mov

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions