diff options
author | Allan Wang <allanwang@google.com> | 2019-07-27 18:59:14 -0700 |
---|---|---|
committer | Allan Wang <allanwang@google.com> | 2019-07-27 18:59:14 -0700 |
commit | 63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5 (patch) | |
tree | a7fdc9cd1ec78a6bd43c80fec33896a3d427d2b6 /sample | |
parent | 99f1e76a4d8d35d4d3ca1aadf68bbc227a70ba01 (diff) | |
download | kau-63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5.tar.gz kau-63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5.tar.bz2 kau-63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5.zip |
Fix compile errors
Diffstat (limited to 'sample')
5 files changed, 12 insertions, 5 deletions
diff --git a/sample/build.gradle b/sample/build.gradle index cacd21f..1441cf0 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -76,6 +76,7 @@ android { packagingOptions { pickFirst 'META-INF/core_release.kotlin_module' pickFirst 'META-INF/library_release.kotlin_module' + pickFirst 'META-INF/library-core_release.kotlin_module' } compileOptions { diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt index 8c35c77..2fedbeb 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt @@ -22,7 +22,7 @@ import ca.allanwang.kau.ui.activities.ElasticRecyclerActivity import ca.allanwang.kau.utils.toast import com.mikepenz.fastadapter.IItem import com.mikepenz.fastadapter.adapters.ItemAdapter -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial /** * Created by Allan Wang on 2017-07-17. diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt index aaa6143..f6d5ccc 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt @@ -43,14 +43,20 @@ class AnimActivity : KauBaseActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val adapter = FastItemAdapter<PermissionCheckbox>() - setContentView(fullLinearRecycler(adapter).apply { setBackgroundColor(KPrefSample.bgColor.withAlpha(255)) }) + setContentView(fullLinearRecycler(adapter).apply { + setBackgroundColor( + KPrefSample.bgColor.withAlpha( + 255 + ) + ) + }) adapter.add(listOf( PERMISSION_ACCESS_COARSE_LOCATION, PERMISSION_ACCESS_FINE_LOCATION, PERMISSION_CAMERA ).map { PermissionCheckbox(it) }) - adapter.withOnClickListener { _, _, item, _ -> + adapter.onClickListener = { _, _, item, _ -> KL.d { "Perm Click" } kauRequestPermissions(item.permission) { granted, _ -> toast("${item.permission} enabled: $granted") diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt index f4a09cf..11d19e5 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt @@ -39,7 +39,7 @@ import ca.allanwang.kau.utils.toast import ca.allanwang.kau.utils.withSceneTransitionAnimation import ca.allanwang.kau.xml.showChangelog import com.afollestad.materialdialogs.input.input -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial class MainActivity : KPrefActivity() { diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt index 025179d..7cf6cc1 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/PermissionCheckbox.kt @@ -25,7 +25,7 @@ import ca.allanwang.kau.utils.hasPermission /** * Created by Allan Wang on 2017-07-03. */ -class PermissionCheckbox(val permission: String) : KauIItem<PermissionCheckbox, PermissionCheckbox.ViewHolder>( +class PermissionCheckbox(val permission: String) : KauIItem<PermissionCheckbox.ViewHolder>( R.layout.permission_checkbox, { ViewHolder(it) }) { override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) { |