0

how can we achieve further dialog in design

on click it show like like with top right arrow below button

if i click below bottom button then dialog should open above the button with bottom right arrow

following is the design

enter image description here

note that button is in the recyclerview

please help thanks

IRON MAN
  • 191
  • 3
  • 18
  • Try with a popup menu, [something like this ](https://stackoverflow.com/questions/21329132/android-custom-dropdown-popup-menu) –  Oct 29 '21 at 12:51
  • @SatoshiTazu sorry not helpful – IRON MAN Oct 29 '21 at 13:00
  • Is this what you are looking for - [Popup window with tooltip](https://stackoverflow.com/questions/21031488/android-popupwindow-with-tooltip-arrow) – Nitish Oct 29 '21 at 13:07

1 Answers1

0

use this library

implementation "com.github.skydoves:balloon:1.3.3"
val balloon = createBalloon(requireContext()) {
        setArrowSize(0)
        setWidth(BalloonSizeSpec.WRAP)
        setHeight(BalloonSizeSpec.WRAP)
        marginRight = 8
        autoDismissDuration = 7000L
        setBalloonAnimation(BalloonAnimation.FADE)
        setBackgroundDrawable(
            ContextCompat.getDrawable(
                requireContext(),
                R.drawable.curve_white_back
            )
        )
        setLayout(R.layout.layout_menu_shop_filter_sort)
        setIsVisibleOverlay(true)
        setOverlayColor(ContextCompat.getColor(requireContext(), R.color.bg_overlay_menu))
        setOverlayShape(BalloonOverlayRoundRect(8f, 8f))
        setLifecycleOwner(lifecycleOwner)
    }

    balloon.showAlignBottom(binding.sort, yOff = 16)
  • how to get id of particluar view access under layout...beacuse i tried but i dint get id click access by doing this -> balloon.getContentView().findViewById(R.id.button_edit) – IRON MAN Nov 01 '21 at 11:11
  • setonclick before ballon.show() . balloon.getContentView().findViewById(R.id.sort_newest).setOnClickListener { ................ } – Alireza Abbasian Nov 02 '21 at 06:42
  • if you want to catch your custom button click action: xml : android:tag="tvNextTag" | kotlin : balloon.getContentView().findViewWithTag("tvBackTag").setOnClickListener { } – MahmutKarali Apr 22 '22 at 03:20