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

hook不到TextView的setText #30

Open
CharlesCT opened this issue Aug 11, 2017 · 1 comment
Open

hook不到TextView的setText #30

CharlesCT opened this issue Aug 11, 2017 · 1 comment

Comments

@CharlesCT
Copy link

老铁求救啊 我hook了 TextView的setText方法 由于他会自动调用public的这个方法
public final void setText(CharSequence text) {
setText(text, mBufferType);
}
我hook这个方法
public void setText(CharSequence text, BufferType type) {
setText(text, type, true, 0);

if (mCharWrapper != null) {
    mCharWrapper.mChars = null;
}

}
但是没有作用 求教
@hook("android.widget.TextView::[email protected]#android.widget.TextView.BufferType")
public static void TextView_setText(TextView view, CharSequence text , TextView.BufferType type) {
Log.v(TAG,"this is text" );
HookManager.getDefault().callSuper(view,text,type);
}

@LiYaHX
Copy link

LiYaHX commented Sep 17, 2019

注解部分写的不对,正确的如下:
@Hook("android.widget.TextView::[email protected]#android.widget.TextView$BufferType")

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

No branches or pull requests

2 participants