35245d0cf6e6e1559ac49b09fbe99c7f5b9e671c
1 package ro
.ieval
.unical
;
2 import android
.content
.Context
;
3 import android
.graphics
.Color
;
4 import android
.view
.LayoutInflater
;
5 import android
.view
.View
;
6 import android
.view
.ViewGroup
;
7 import android
.widget
.ArrayAdapter
;
8 import android
.widget
.ImageView
;
9 import android
.widget
.TextView
;
12 public class EventAdapter
extends ArrayAdapter
<EventRowContainer
> {
13 private final EventRowContainer
[] values
;
14 private final Context context
;
15 public EventAdapter(Context context
,EventRowContainer
[] values
) {
16 super(context
,R
.layout
.event_row_layout
,values
);
22 public View
getView(int position
, View convertView
, ViewGroup parent
) {
23 LayoutInflater inflater
= (LayoutInflater
) context
24 .getSystemService(Context
.LAYOUT_INFLATER_SERVICE
);
25 View rowView
= inflater
.inflate(R
.layout
.event_row_layout
, parent
, false);
26 TextView title
= (TextView
) rowView
.findViewById(R
.id
.smalleventtitle
);
27 TextView dstart
= (TextView
) rowView
.findViewById(R
.id
.smalldatestart
);
28 TextView dend
= (TextView
) rowView
.findViewById(R
.id
.smalldateend
);
29 ImageView header
= (ImageView
) rowView
.findViewById(R
.id
.rowHeader
);
30 header
.setBackgroundColor(Color
.CYAN
);
31 title
.setText(values
[position
].name
);
32 dstart
.setText(values
[position
].dtstart
.toString());
33 dend
.setText(values
[position
].dtend
.toString());
This page took 0.021117 seconds and 3 git commands to generate.