]> iEval git - unical.git/commitdiff
Clean up
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Jun 2013 21:30:43 +0000 (00:30 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 9 Jun 2013 21:30:43 +0000 (00:30 +0300)
src/ro/ieval/unical/EventAdapter.java
src/ro/ieval/unical/EventListActivity.java

index 73f29fb0d50f93c83b396134970778ae82efe3d2..b06e08a38fe06b3d3272b5fc0eb71032c5574304 100644 (file)
@@ -2,33 +2,32 @@ package ro.ieval.unical;
 import java.util.Date;
 
 import android.content.Context;
-import android.graphics.Color;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
-import android.widget.ImageView;
 import android.widget.TextView;
 
 
 public class EventAdapter extends ArrayAdapter<Event> {
        private final Event[] values;
        private final Context context;
-       public EventAdapter(Context context,Event[] values) {
+
+       public EventAdapter(final Context context, final Event[] values) {
                super(context,R.layout.event_row_layout,values);
                this.context=context;
                this.values=values;
        }
        
        @Override
-       public View getView(int position, View convertView, ViewGroup parent) {
-           LayoutInflater inflater = (LayoutInflater) context
+       public View getView(final int position, final View convertView, final ViewGroup parent) {
+           final LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-           View rowView = inflater.inflate(R.layout.event_row_layout, parent, false);
-           TextView title = (TextView) rowView.findViewById(R.id.smalleventtitle);
-           TextView dstart = (TextView) rowView.findViewById(R.id.smalldatestart);
-           TextView dend = (TextView) rowView.findViewById(R.id.smalldateend);
-           ImageView header = (ImageView) rowView.findViewById(R.id.rowHeader);
+           final View rowView = inflater.inflate(R.layout.event_row_layout, parent, false);
+           final TextView title = (TextView) rowView.findViewById(R.id.smalleventtitle);
+           final TextView dstart = (TextView) rowView.findViewById(R.id.smalldatestart);
+           final TextView dend = (TextView) rowView.findViewById(R.id.smalldateend);
+           final View header = rowView.findViewById(R.id.rowHeader);
            header.setBackgroundColor(values[position].eventColour);
            title.setText(values[position].title);
            dstart.setText(new Date(values[position].dtstart).toString());
index 18fa49d7b95b6bf5dcdc43bf7495b944498bd6cf..7379d59c6a1dcdcb897906a92237dddb6d8e1641 100644 (file)
@@ -31,9 +31,8 @@ public class EventListActivity extends Activity {
                lv.setOnItemClickListener(new OnItemClickListener() {
 
                        @Override
-                       public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
-                                       long arg3) {
-                               // TODO Auto-generated method stub
+                       public void onItemClick(final AdapterView<?> arg0, final View arg1, final int arg2,
+                                       final long arg3) {
                                DisplayEventActivity.displayEvent(EventListActivity.this,events[arg2]);
                        }
                        
This page took 0.034611 seconds and 4 git commands to generate.