Open TuricaHoria opened 4 years ago
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
Facing the same
ViewGroup viewGroup = mActivity.getWindow().getDecorView().findViewById(android.R.id.content);| use this container
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()
I would love the help :D