Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public View newView(Context context, Cursor cursor, ViewGroup parent) {
- View view = LayoutInflater.from(context).inflate(R.layout_my_view, null);
- TextView tv = (TextView) view.findViewById(R.id.text1);
- ImageView iv = (ImageView) view.findViewById(R.id.image1);
- view.setTag(R.id.text1, tv);
- view.setTag(R.id.image1, iv);
- return view;
- }
- public void bindView(View view, Context context, Cursor cursor) {
- ((TextView) view.getTag(R.id.text1)).setText(cursor.getString(cursor.getColumnIndex(COL_TEXT_1)));
- ((ImageView) view.getTag(R.id.image1)).setImageResource(R.drawable.image);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement