我正在使用Twitter句柄运行此代码我很确定不存在以便测试错误处理.回调中的断点永远不会被击中,无论是成功还是失败.
有关为什么会这样的指示?
就像一个注释,这个代码可以正常使用有效的Twitter句柄,但也不会调用回调.
final Callback actionCallback = new Callback() {
@Override
public void success(Result result) {
int x = 1;
x++; // This code is just so I can put a breakpoint here
}
@Override
public void failure(TwitterException exception) {
DialogManager.showOkDialog(context, R.string.twitter_feed_not_found);
}
};
final UserTimeline userTimeline = new UserTimeline.Builder().screenName(handleStr + "dfdfddfdfdfasdf") // Handle that doesn't exist
.includeReplies(false).includeRetweets(false).maxItemsPerRequest(5).build();
final TweetTimelineListAdapter adapter = new TweetTimelineListAdapter.Builder(context)
.setTimeline(userTimeline)
.setViewStyle(R.style.tw__TweetLightWithActionsStyle)
.setOnActionCallback(actionCallback)
.build();
listView.setAdapter(adapter);