1
通過此代碼,我調用了一個活動的方法。如何調用屬於某個活動的片段的方法
我需要的是調用屬於某個活動的片段的方法。
if (AppCompatActivity.class.equals(ctx.getClass().getSuperclass())) {
if (callBackName != null) {
Activity activity = (Activity) ctx;
Method method = activity.getClass().getMethod(callBackName, parameters);
method.invoke(activity, response, isError, errorType);
}
}