Skip to content

Instantly share code, notes, and snippets.

@barmgeat
Last active September 16, 2018 00:39
Show Gist options
  • Save barmgeat/265fda99cecb6db473013c340d6e0a30 to your computer and use it in GitHub Desktop.
Save barmgeat/265fda99cecb6db473013c340d6e0a30 to your computer and use it in GitHub Desktop.
..
@Override
public View newView(Context context, Cursor cursor, ViewGroup viewGroup) {
return LayoutInflater.from(context).inflate(R.layout.word_item_layout, viewGroup, false);
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
TextView t_word = view.findViewById(R.id.item_word);
TextView t_word_A = view.findViewById(R.id.item_word_a);
TextView t_word_E = view.findViewById(R.id.item_word_e);
String s_word = cursor.getString(cursor.getColumnIndexOrThrow("word"));
String s_word_A = cursor.getString(cursor.getColumnIndexOrThrow("t_word"));
String s_word_E = cursor.getString(cursor.getColumnIndexOrThrow("t2_word"));
t_word.setText(s_word);
t_word_A.setText(s_word_A);
t_word_E.setText(s_word_E);
}
..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment