mirror of
https://github.com/etesync/android
synced 2025-07-01 20:32:39 +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.Collections;
|
||||||
import at.bitfire.davdroid.model.ServiceDB.OpenHelper;
|
import at.bitfire.davdroid.model.ServiceDB.OpenHelper;
|
||||||
import at.bitfire.davdroid.model.ServiceDB.Services;
|
import at.bitfire.davdroid.model.ServiceDB.Services;
|
||||||
|
import at.bitfire.davdroid.resource.LocalCalendar;
|
||||||
import at.bitfire.ical4android.TaskProvider;
|
import at.bitfire.ical4android.TaskProvider;
|
||||||
import lombok.Cleanup;
|
import lombok.Cleanup;
|
||||||
|
|
||||||
@ -470,15 +471,12 @@ public class AccountActivity extends AppCompatActivity implements Toolbar.OnMenu
|
|||||||
|
|
||||||
final CollectionInfo info = getItem(position);
|
final CollectionInfo info = getItem(position);
|
||||||
|
|
||||||
CheckBox checked = (CheckBox)v.findViewById(R.id.checked);
|
|
||||||
checked.setChecked(info.selected);
|
|
||||||
|
|
||||||
View vColor = v.findViewById(R.id.color);
|
View vColor = v.findViewById(R.id.color);
|
||||||
if (info.color != null) {
|
if (info.color != null) {
|
||||||
vColor.setVisibility(View.VISIBLE);
|
|
||||||
vColor.setBackgroundColor(info.color);
|
vColor.setBackgroundColor(info.color);
|
||||||
} else
|
} else {
|
||||||
vColor.setVisibility(View.GONE);
|
vColor.setBackgroundColor(LocalCalendar.defaultColor);
|
||||||
|
}
|
||||||
|
|
||||||
TextView tv = (TextView)v.findViewById(R.id.title);
|
TextView tv = (TextView)v.findViewById(R.id.title);
|
||||||
tv.setText(TextUtils.isEmpty(info.displayName) ? info.url : info.displayName);
|
tv.setText(TextUtils.isEmpty(info.displayName) ? info.url : info.displayName);
|
||||||
|
@ -15,22 +15,6 @@
|
|||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:gravity="center_vertical">
|
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
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -58,4 +42,11 @@
|
|||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:background="@drawable/ic_remove_circle_dark"/>
|
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>
|
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user