1
0
mirror of https://github.com/etesync/android synced 2024-12-23 23:18:46 +00:00

Create collection: fix the shown color to be the default color.

This commit is contained in:
Tom Hacohen 2019-01-29 23:15:05 +00:00
parent a1051856ec
commit 635a512ca6

View File

@ -22,6 +22,8 @@ import android.widget.EditText
import com.etesync.syncadapter.R
import com.etesync.syncadapter.model.CollectionInfo
import com.etesync.syncadapter.resource.LocalCalendar
import com.etesync.syncadapter.resource.LocalTaskList
import org.apache.commons.lang3.StringUtils
@ -49,6 +51,7 @@ open class CreateCollectionActivity : BaseActivity() {
displayName.setHint(R.string.create_calendar_display_name_hint)
val colorSquare = findViewById<View>(R.id.color)
colorSquare.setBackgroundColor(LocalCalendar.defaultColor)
colorSquare.setOnClickListener {
AmbilWarnaDialog(this@CreateCollectionActivity, (colorSquare.background as ColorDrawable).color, true, object : AmbilWarnaDialog.OnAmbilWarnaListener {
override fun onCancel(dialog: AmbilWarnaDialog) {}
@ -64,6 +67,7 @@ open class CreateCollectionActivity : BaseActivity() {
displayName.setHint(R.string.create_tasklist_display_name_hint)
val colorSquare = findViewById<View>(R.id.color)
colorSquare.setBackgroundColor(LocalTaskList.defaultColor)
colorSquare.setOnClickListener {
AmbilWarnaDialog(this@CreateCollectionActivity, (colorSquare.background as ColorDrawable).color, true, object : AmbilWarnaDialog.OnAmbilWarnaListener {
override fun onCancel(dialog: AmbilWarnaDialog) {}