我有一個適配器活動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