From 5dbea8579e019ab156eca1d657fdfffcbd3e128c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 16 Feb 2017 01:47:43 +0000 Subject: [PATCH] Redesign calendar look in account page. --- .../bitfire/davdroid/ui/AccountActivity.java | 10 ++++---- .../main/res/layout/account_caldav_item.xml | 23 ++++++------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/at/bitfire/davdroid/ui/AccountActivity.java b/app/src/main/java/at/bitfire/davdroid/ui/AccountActivity.java index c04750f7..057c50e4 100644 --- a/app/src/main/java/at/bitfire/davdroid/ui/AccountActivity.java +++ b/app/src/main/java/at/bitfire/davdroid/ui/AccountActivity.java @@ -68,6 +68,7 @@ import at.bitfire.davdroid.model.CollectionInfo; import at.bitfire.davdroid.model.ServiceDB.Collections; import at.bitfire.davdroid.model.ServiceDB.OpenHelper; import at.bitfire.davdroid.model.ServiceDB.Services; +import at.bitfire.davdroid.resource.LocalCalendar; import at.bitfire.ical4android.TaskProvider; import lombok.Cleanup; @@ -470,15 +471,12 @@ public class AccountActivity extends AppCompatActivity implements Toolbar.OnMenu final CollectionInfo info = getItem(position); - CheckBox checked = (CheckBox)v.findViewById(R.id.checked); - checked.setChecked(info.selected); - View vColor = v.findViewById(R.id.color); if (info.color != null) { - vColor.setVisibility(View.VISIBLE); vColor.setBackgroundColor(info.color); - } else - vColor.setVisibility(View.GONE); + } else { + vColor.setBackgroundColor(LocalCalendar.defaultColor); + } TextView tv = (TextView)v.findViewById(R.id.title); tv.setText(TextUtils.isEmpty(info.displayName) ? info.url : info.displayName); diff --git a/app/src/main/res/layout/account_caldav_item.xml b/app/src/main/res/layout/account_caldav_item.xml index e9cff432..a5dd7fea 100644 --- a/app/src/main/res/layout/account_caldav_item.xml +++ b/app/src/main/res/layout/account_caldav_item.xml @@ -15,22 +15,6 @@ android:padding="8dp" android:gravity="center_vertical"> - - - - + + \ No newline at end of file