Loading res/layout-sw600dp/agenda_day.xml +5 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ --> <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@color/agenda_day_bar_background_color" android:background="@drawable/agenda_item_bg_primary" android:layout_height="wrap_content" android:layout_width="match_parent" android:columnCount="2" Loading Loading @@ -55,13 +55,15 @@ <TextView android:id="@+id/day" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_width="0dip" android:gravity="center_vertical" android:layout_gravity="center_vertical|left" android:layout_gravity="center_vertical|fill_horizontal" android:layout_column="1" android:layout_row="1" android:layout_marginTop="2dip" android:layout_marginLeft="8dip" android:layout_marginRight="16dip" android:ellipsize="marquee" android:textSize="14sp" android:singleLine="true" android:minHeight="42dip" Loading src/com/android/calendar/agenda/AgendaByDayAdapter.java +3 −13 Original line number Diff line number Diff line Loading @@ -52,17 +52,16 @@ public class AgendaByDayAdapter extends BaseAdapter { private Time mTmpTime; private String mTimeZone; // Note: Formatter is not thread safe. Fine for now as it is only used by the main thread. private Formatter mFormatter; private StringBuilder mStringBuilder; private final Formatter mFormatter; private final StringBuilder mStringBuilder; static class ViewHolder { TextView dayView; TextView dateView; int julianDay; boolean grayed; } private Runnable mTZUpdater = new Runnable() { private final Runnable mTZUpdater = new Runnable() { @Override public void run() { mTimeZone = Utils.getTimeZone(mContext, this); Loading Loading @@ -192,7 +191,6 @@ public class AgendaByDayAdapter extends BaseAdapter { holder.dayView = (TextView) agendaDayView.findViewById(R.id.day); holder.dateView = (TextView) agendaDayView.findViewById(R.id.date); holder.julianDay = row.mDay; holder.grayed = false; agendaDayView.setTag(holder); } Loading Loading @@ -232,14 +230,6 @@ public class AgendaByDayAdapter extends BaseAdapter { holder.dayView.setText(dayViewText); holder.dateView.setText(dateViewText); // Set the background of the view, it is grayed for day that are in the past and today if (row.mDay > mTodayJulianDay) { agendaDayView.setBackgroundResource(R.drawable.agenda_item_bg_primary); holder.grayed = false; } else { agendaDayView.setBackgroundResource(R.drawable.agenda_item_bg_secondary); holder.grayed = true; } return agendaDayView; } else if (row.mType == TYPE_MEETING) { View itemView = mAgendaAdapter.getView(row.mPosition, convertView, parent); Loading src/com/android/calendar/agenda/AgendaListView.java +1 −8 Original line number Diff line number Diff line Loading @@ -139,14 +139,7 @@ public class AgendaListView extends ListView implements OnItemClickListener { for (int i = 0; i < childCount; ++i) { View listItem = getChildAt(i); Object o = listItem.getTag(); if (o instanceof AgendaByDayAdapter.ViewHolder) { // day view - check if day in the past and not grayed yet AgendaByDayAdapter.ViewHolder holder = (AgendaByDayAdapter.ViewHolder) o; if (holder.julianDay <= todayJulianDay && !holder.grayed) { needUpdate = true; break; } } else if (o instanceof AgendaAdapter.ViewHolder) { if (o instanceof AgendaAdapter.ViewHolder) { // meeting view - check if event in the past or started already and not grayed yet // All day meetings for a day are grayed out AgendaAdapter.ViewHolder holder = (AgendaAdapter.ViewHolder) o; Loading Loading
res/layout-sw600dp/agenda_day.xml +5 −3 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ --> <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@color/agenda_day_bar_background_color" android:background="@drawable/agenda_item_bg_primary" android:layout_height="wrap_content" android:layout_width="match_parent" android:columnCount="2" Loading Loading @@ -55,13 +55,15 @@ <TextView android:id="@+id/day" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_width="0dip" android:gravity="center_vertical" android:layout_gravity="center_vertical|left" android:layout_gravity="center_vertical|fill_horizontal" android:layout_column="1" android:layout_row="1" android:layout_marginTop="2dip" android:layout_marginLeft="8dip" android:layout_marginRight="16dip" android:ellipsize="marquee" android:textSize="14sp" android:singleLine="true" android:minHeight="42dip" Loading
src/com/android/calendar/agenda/AgendaByDayAdapter.java +3 −13 Original line number Diff line number Diff line Loading @@ -52,17 +52,16 @@ public class AgendaByDayAdapter extends BaseAdapter { private Time mTmpTime; private String mTimeZone; // Note: Formatter is not thread safe. Fine for now as it is only used by the main thread. private Formatter mFormatter; private StringBuilder mStringBuilder; private final Formatter mFormatter; private final StringBuilder mStringBuilder; static class ViewHolder { TextView dayView; TextView dateView; int julianDay; boolean grayed; } private Runnable mTZUpdater = new Runnable() { private final Runnable mTZUpdater = new Runnable() { @Override public void run() { mTimeZone = Utils.getTimeZone(mContext, this); Loading Loading @@ -192,7 +191,6 @@ public class AgendaByDayAdapter extends BaseAdapter { holder.dayView = (TextView) agendaDayView.findViewById(R.id.day); holder.dateView = (TextView) agendaDayView.findViewById(R.id.date); holder.julianDay = row.mDay; holder.grayed = false; agendaDayView.setTag(holder); } Loading Loading @@ -232,14 +230,6 @@ public class AgendaByDayAdapter extends BaseAdapter { holder.dayView.setText(dayViewText); holder.dateView.setText(dateViewText); // Set the background of the view, it is grayed for day that are in the past and today if (row.mDay > mTodayJulianDay) { agendaDayView.setBackgroundResource(R.drawable.agenda_item_bg_primary); holder.grayed = false; } else { agendaDayView.setBackgroundResource(R.drawable.agenda_item_bg_secondary); holder.grayed = true; } return agendaDayView; } else if (row.mType == TYPE_MEETING) { View itemView = mAgendaAdapter.getView(row.mPosition, convertView, parent); Loading
src/com/android/calendar/agenda/AgendaListView.java +1 −8 Original line number Diff line number Diff line Loading @@ -139,14 +139,7 @@ public class AgendaListView extends ListView implements OnItemClickListener { for (int i = 0; i < childCount; ++i) { View listItem = getChildAt(i); Object o = listItem.getTag(); if (o instanceof AgendaByDayAdapter.ViewHolder) { // day view - check if day in the past and not grayed yet AgendaByDayAdapter.ViewHolder holder = (AgendaByDayAdapter.ViewHolder) o; if (holder.julianDay <= todayJulianDay && !holder.grayed) { needUpdate = true; break; } } else if (o instanceof AgendaAdapter.ViewHolder) { if (o instanceof AgendaAdapter.ViewHolder) { // meeting view - check if event in the past or started already and not grayed yet // All day meetings for a day are grayed out AgendaAdapter.ViewHolder holder = (AgendaAdapter.ViewHolder) o; Loading