TakuSemba / Spotlight

Android Library that lights items for tutorials or walk-throughs etc...
Apache License 2.0
3.63k stars 364 forks source link

Spotlight covering bottom phone navigation #109

Open TuricaHoria opened 4 years ago

TuricaHoria commented 4 years ago

image

So i put on an overlay with some items and it goes over my navigation:

private fun spotlightView(view: View , ) { val overlay = layoutInflater.inflate(R.layout.fragment_calendar_day_detailed_info, context?.let { FrameLayout(it) }) val target = Target.Builder() .setAnchor(view) .setOverlay(overlay) .isClickable(false) .setShape(RoundedRectangle(view.height.toFloat(), view.width.toFloat(), 0f)) .setOnTargetListener( object : OnTargetListener { override fun onEnded() {} override fun onStarted() {} }).build()

        val spotlight = activity?.let { activity ->
            Spotlight.Builder(activity)
                .setTargets(target)
                .setBackgroundColor(R.color.spotlightBackground)
                .setDuration(1000L)
                .setAnimation(DecelerateInterpolator(2f))
                .setOnSpotlightListener(object : OnSpotlightListener {
                    override fun onStarted() {}
                    override fun onEnded() {}
                })
                .build()
        }
        spotlight?.start()

I would love the help :D

anmolvermamm commented 2 years ago

Facing the same

shrikantingole08 commented 2 years ago
    ViewGroup viewGroup = mActivity.getWindow().getDecorView().findViewById(android.R.id.content);|

use this container