Comments (4)
Is it solved? Its gonna 1 year. Issue still exists
from spotlight.
Here too.
from spotlight.
I added a possible fix based on crash logs and your suggestions in SpotlightView class.
private void show(final Activity activity) {
if (preferencesManager.isDisplayed(usageId))
return;
((ViewGroup) activity.getWindow().getDecorView()).addView(this);
setReady(true);
SpotlightView.this.post(new Runnable() {
@Override
public void run() {
try{
boolean isAttachedToWindow = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
isAttachedToWindow = SpotlightView.this.isAttachedToWindow();
}
if(isAttachedToWindow) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (isRevealAnimationEnabled)
startRevealAnimation(activity);
else {
startFadinAnimation(activity);
}
} else {
startFadinAnimation(activity);
}
}
}catch(Exception e){
e.printStackTrace();
}
}
});
}
I modified above method to avoid that crash but I'm unable to reproduce this issue and so unable to test this. Can you guys check this change in your code and confirm if this is the working fix for you or not?
from spotlight.
Hi, dhavalwooplr
Crash issue is fixed by changing to your code above, but we can't show the tutorial [Spotlight View ] again if we use the above code....
Crash issue was found when :
- A spotlight view tutorial is being displayed in screen, user exits the app by calling finish ().
-Next time when app open's crash report :
Fatal Exception: java.lang.IllegalStateException: Cannot start this animator on a detached view! at android.view.RenderNode.addAnimator(RenderNode.java:812) at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:300) at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:282) at android.animation.RevealAnimator.<init>(RevealAnimator.java:37) at android.view.ViewAnimationUtils.createCircularReveal(ViewAnimationUtils.java:55) at com.wooplr.spotlight.SpotlightView.startRevealAnimation(SpotlightView.java:358) at com.wooplr.spotlight.SpotlightView.access$100(SpotlightView.java:54) at com.wooplr.spotlight.SpotlightView$1.run(SpotlightView.java:319) at android.os.Handler.handleCallback(Handler.java:746) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Method.java)
What i have done to avoid crash
-
Modified SpotlightView.java with your code below
`SpotlightView.this.post(new Runnable() {
@OverRide
public void run() {
try{
boolean isAttachedToWindow = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
isAttachedToWindow = SpotlightView.this.isAttachedToWindow();
}if(isAttachedToWindow) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (isRevealAnimationEnabled) startRevealAnimation(activity); else { startFadinAnimation(activity); } } else { startFadinAnimation(activity); } } }catch(Exception e){ e.printStackTrace(); } } });`
Issue facing now
- I used to show the tutorial again by clearing Shared preference values in a Method.
- Now the tutorial cant be shown again , if i use your code above.
Please help me in fixing this
from spotlight.
Related Issues (20)
- Start Sequence HOT 5
- Listener "onSpotlightSequenceEnd" HOT 4
- Using Spotlight for a view inside an overlay view via window manager HOT 1
- can't use it in fragment !! HOT 2
- spotlightConfig.setTypeface not work HOT 2
- When using 'extends ListActivity' in the Activity - spotlight doesn't show
- set gravity for SubHeadingTv
- Unable to set Spotlight view on Actionbar menu item HOT 4
- not working in dialog
- onBackPress activity gets destroy
- can change the the first start anime line
- Spotlight lights not showing at all HOT 1
- getCurrentPosition in Sequence
- How to detect spotlight being touched or closed HOT 2
- How do I reset it so that I can start the tutorial when I want HOT 1
- I'm using Spotlight in a fragment, I got Attempt to invoke virtual method 'void android.view.View.getLocationInWindow(int[])' on a null object reference
- ProGuard Rules : Unresolved class name issue
- Slow down the line drawing like smoth drawing not into two parts quickly
- Could we set the line gravity top or bottom?
- Want Multiple spotlight targets at same time HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotlight.