Skip to content

Commit 4ad5eeb

Browse files
authored
proper id to find text views in ChatHolder
Using wrong id's to finde text views 1 and 2.
1 parent e9e07e5 commit 4ad5eeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

database/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ public static class ChatHolder extends RecyclerView.ViewHolder {
237237
}
238238

239239
public void setName(String name) {
240-
TextView field = (TextView) mView.findViewById(R.id.name_text);
240+
TextView field = (TextView) mView.findViewById(android.R.id.text1);
241241
field.setText(name);
242242
}
243243

244244
public void setText(String text) {
245-
TextView field = (TextView) mView.findViewById(R.id.message_text);
245+
TextView field = (TextView) mView.findViewById(android.R.id.text2);
246246
field.setText(text);
247247
}
248248
}

0 commit comments

Comments
 (0)