/>
<!-- CALENDAR -->
- <LinearLayout android:id="@+id/calendar_container"
+ <RelativeLayout android:id="@+id/calendar_container"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
+ android:layout_toRightOf="@id/calendar_label"
+ android:layout_alignTop="@id/calendar_label"
style="?android:attr/textAppearanceSmall"
/>
- </LinearLayout>
+
+ <TextView android:id="@+id/owner"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:layout_alignLeft="@id/calendar_label"
+ android:layout_below="@id/calendar_label"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ />
+
+ </RelativeLayout>
<View android:id="@+id/divider"
android:layout_width="match_parent"
<color name="saturday_text_color">#ff112abb</color>
<color name="calendar_event_selected_text_color">#ff000000</color>
<color name="calendar_event_text_color">#ffffffff</color>
+ <color name="calendar_owner_text_color">#ffbebebe</color>
<color name="calendar_all_day_background">#ffe8eef7</color>
<color name="week_saturday">#ff446688</color>
TextView accountName = (TextView) view.findViewById(R.id.account_name);
if(accountName != null) {
+ Resources res = context.getResources();
accountName.setText(cursor.getString(CALENDARS_INDEX_OWNER_ACCOUNT));
accountName.setVisibility(TextView.VISIBLE);
+ accountName.setTextColor(res.getColor(R.color.calendar_owner_text_color));
}
}
}
String calendarName = mCalendarsCursor.getString(CALENDARS_INDEX_DISPLAY_NAME);
String ownerAccount = mCalendarsCursor.getString(CALENDARS_INDEX_OWNER_ACCOUNT);
if (mIsDuplicateName && !calendarName.equalsIgnoreCase(ownerAccount)) {
- calendarName = new StringBuilder(calendarName)
- .append(Utils.OPEN_EMAIL_MARKER)
- .append(ownerAccount)
- .append(Utils.CLOSE_EMAIL_MARKER)
- .toString();
+ Resources res = getResources();
+ TextView ownerText = (TextView) findViewById(R.id.owner);
+ ownerText.setText(ownerAccount);
+ ownerText.setTextColor(res.getColor(R.color.calendar_owner_text_color));
+ } else {
+ setVisibilityCommon(R.id.owner, View.GONE);
}
setTextCommon(R.id.calendar, calendarName);
} else {