0

I want to create a tutorial for a user in my application. I use the TapTargetView library for this, when calling it on dialogfragment, the view that is created is displayed in the background of dialogfragment (red circle)

 override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {


        val tap = TapTarget.forView(
            binding.kosztEditText,
            "tittle",
            "description")
            .outerCircleColor(R.color.Red2) // Specify a color for the outer circle
            .outerCircleAlpha(0.96f) // Specify the alpha amount for the outer circle
            .titleTextSize(24) // Specify the size (in sp) of the title text
            .titleTextColor(R.color.white) // Specify the color of the title text
            .descriptionTextSize(16) // Specify the size (in sp) of the description text
            .textColor(R.color.white) // Specify a color for both the title and description text
            .dimColor(R.color.black) // If set, will dim behind the view with 30% opacity of the given color
            .targetCircleColor(R.color.Red2)
            .drawShadow(false) // Whether to draw a drop shadow or not
            .cancelable(true) // Whether tapping outside the outer circle dismisses the view
            .targetRadius(25)
            .transparentTarget(true)


        var a = TapTargetView.showFor(dialog,tap,object : TapTargetView.Listener(){
            override fun onTargetClick(view: TapTargetView?) {
                super.onTargetClick(view)
                view!!.dismiss(true)
            }

            override fun onOuterCircleClick(view: TapTargetView?) {
                super.onOuterCircleClick(view)
                view!!.dismiss(true)
            }
        })

i tried to change z-index, convert dialog fragment to dialog, add created view to fragment and nothing worked

Maciej123m
  • 31
  • 7

0 Answers0