diff options
Diffstat (limited to 'sample/src/main/kotlin')
4 files changed, 11 insertions, 5 deletions
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>) { |