mirror of
https://github.com/etesync/android
synced 2024-12-23 07:08:16 +00:00
Redesign calendar look in account page.
This commit is contained in:
parent
7c4e6a11e1
commit
5dbea8579e
@ -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);
|
||||
|
@ -15,22 +15,6 @@
|
||||
android:padding="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checked"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:clickable="false"
|
||||
android:layout_marginRight="4dp"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/color"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginRight="4dp"
|
||||
tools:background="@color/green700"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@ -58,4 +42,11 @@
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/ic_remove_circle_dark"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/color"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginRight="4dp"
|
||||
tools:background="@color/green700"/>
|
||||
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user