]> iEval git - unical.git/commitdiff
add tiny bar on the event list`
authorPetru Trimbitas <l3asketballplayer@yahoo.com>
Sun, 9 Jun 2013 19:51:11 +0000 (22:51 +0300)
committerPetru Trimbitas <l3asketballplayer@yahoo.com>
Sun, 9 Jun 2013 19:51:11 +0000 (22:51 +0300)
res/layout/event_row_layout.xml
src/ro/ieval/unical/EventAdapter.java
src/ro/ieval/unical/EventListActivity.java

index bb55f153f28974679f24626b4c31cf4521289051..1f92a3c9cbff65c98c0715f099f094a02fb6325f 100644 (file)
@@ -4,6 +4,12 @@
     android:layout_height="match_parent"
     android:orientation="vertical" >
 
+    <ImageView
+        android:id="@+id/rowHeader"
+        android:layout_width="match_parent"
+        android:layout_height="5dp"
+     />
+
     <TextView
         android:id="@+id/smalleventtitle"
         android:layout_width="match_parent"
index 4443cd810030422196c0dbc32bfd76d0c7521f63..35245d0cf6e6e1559ac49b09fbe99c7f5b9e671c 100644 (file)
@@ -1,9 +1,11 @@
 package ro.ieval.unical;
 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;
 
 
@@ -24,6 +26,8 @@ public class EventAdapter extends ArrayAdapter<EventRowContainer> {
            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);
+           header.setBackgroundColor(Color.CYAN);
            title.setText(values[position].name);
            dstart.setText(values[position].dtstart.toString());
            dend.setText(values[position].dtend.toString());
index 9e6d2e8e1e89e480b964e476a4330fcfc662a1df..1b550249938ce32a0a250244a5ab886fe9c1413a 100644 (file)
@@ -38,6 +38,7 @@ public class EventListActivity extends Activity {
                for(int i=0; i<events.length; ++i) {
                        EventRowContainer c=new EventRowContainer(i,events[i].title, events[i].dtstart, events[i].dtend);
                        r[i]=c;
+                       //System.out.println(events[i].eventColour);
                }
                final EventAdapter adapter = new EventAdapter(this, r);
                lv.setAdapter(adapter);
This page took 0.030101 seconds and 4 git commands to generate.