Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: OnResume getLineLeft crash #105

Open
kelifu opened this issue Jun 5, 2019 · 1 comment
Open

fix: OnResume getLineLeft crash #105

kelifu opened this issue Jun 5, 2019 · 1 comment
Labels

Comments

@kelifu
Copy link

kelifu commented Jun 5, 2019

Modify the source code of the ScaleText class

@OverRide
public void drawFrame(Canvas canvas) {
Layout layout = mHTextView.getLayout();
if (null != layout){
········
}
}

@mark99i
Copy link

mark99i commented Nov 13, 2019

the same problem in FallText.java:67

java.lang.NullPointerException: Attempt to invoke virtual method 'float android.text.Layout.getLineLeft(int)' on a null object reference
	at com.hanks.htextview.fall.FallText$3.run(FallText.java:67)
	at android.os.Handler.handleCallback(Handler.java:789)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:171)
	at android.app.ActivityThread.main(ActivityThread.java:6699)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:246)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)

and may be in FallText.java:102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants