skydoves/Submarine

OnClick doesn't work when a tooltip is defined

RobbWatershed opened this issue · 2 comments

Please complete the following information:

  • Library Version [e.g. v2.0.6]
  • Affected Device(s) Huawei 8X (Android 10) / Emulator (Android 8.1)

Describe the Bug:

When creating a SubmarineItem with a tooltip, its ItemClickListener doesn't activate when the user taps the item

<com.skydoves.submarine.SubmarineView
        android:id="@+id/information_micro_menu"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:alpha="0.8"
        app:layout_constraintBottom_toBottomOf="@id/viewer_info_btn"
        app:layout_constraintStart_toStartOf="@id/viewer_info_btn"
        app:layout_constraintEnd_toEndOf="@id/viewer_info_btn"
        app:submarine_animation="scale"
        app:submarine_circleAnchor="bottom"
        app:submarine_color="@android:color/black"
        app:submarine_circleSize="14dp"
        app:submarine_expandSize="170dp"
        app:submarine_duration="250"
        app:submarine_orientation="vertical" />
binding.controlsOverlay.informationMicroMenu.setSubmarineItemClickListener((p, i) -> onInfoMicroMenuClick(p));
binding.controlsOverlay.informationMicroMenu.addSubmarineItem(
	new SubmarineItem(ContextCompat.getDrawable(requireContext(), R.drawable.ic_book)) // <-- onClick works
);
binding.controlsOverlay.informationMicroMenu.addSubmarineItem(
         new SubmarineItem(ContextCompat.getDrawable(requireContext(), R.drawable.ic_page), null, getResources().getString(R.string.page_details)) // <-- onClick is never called
);

Expected Behavior:

ItemClickListener is always called when tapping the item, regardless of the presence of a tooltip.

Hi, the new release 1.0.7 has been released!
Thanks for your issue :)

Works fine now. Thanks as always for the quick fix ! ❤️