我有一个适配器活动extends RecyclerView.Adapter<UserProfileAdapter.ViewHolder>
。问题是,当用户点击列表中的项目之一的“自动连接”,我得到以下异常:AndroidRuntimeException当在活动中单击URL时
在我UserProfileActivity,我实例化我的适配器像他:
UserProfileAdapter adapter = new UserProfileAdapter(getApplicationContext(), posts);
在适配器,我找回这样的背景下:
private Context mContext;
private List<ParseObject> mYeets;
private UserProfileAdapter adapter;
public UserProfileAdapter(Context context, List<ParseObject> yeets) {
super();
this.mYeets = yeets;
this.mContext = context;
this.adapter = this;
}
我怎样才能确保自动链接文本不会产生这个错误?由于没有与链接/意图关联的代码,我甚至可以做什么?
你截图的消息中有哪些不清楚? –
事实上,没有实际的意图启动链接。它是一个Recycler列表项中的“自动链接”文本。所以我只是不能去为这个意图添加一个标志。 – santafebound