diff options
Diffstat (limited to 'kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt')
-rw-r--r-- | kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt index 3201fbd..675e387 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2018 Allan Wang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ca.allanwang.kau.kpref.activity.items import ca.allanwang.kau.colorpicker.CircleView @@ -53,15 +68,15 @@ open class KPrefColorPicker(open val builder: KPrefColorContract) : KPrefItemBas /** * Default implementation of [KPrefColorContract] */ - class KPrefColorBuilder(globalOptions: GlobalOptions, - titleId: Int, - getter: () -> Int, - setter: (value: Int) -> Unit + class KPrefColorBuilder( + globalOptions: GlobalOptions, + titleId: Int, + getter: () -> Int, + setter: (value: Int) -> Unit ) : KPrefColorContract, BaseContract<Int> by BaseBuilder(globalOptions, titleId, getter, setter), - ColorContract by ColorBuilder() { + ColorContract by ColorBuilder() { override var showPreview: Boolean = true } override fun getType(): Int = R.id.kau_item_pref_color_picker - -}
\ No newline at end of file +} |