From 57791c4af6e24ca0daeb493e5c2d002e27a3e3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20G=C3=B6rg=C3=BCl=C3=BC?= Date: Sun, 17 Jul 2022 10:14:54 +0300 Subject: [PATCH] Update sample app --- .../og/android/sample/toggleiconview/MainActivity.kt | 11 ++++------- sample/src/main/res/layout/activity_main.xml | 10 ++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sample/src/main/java/og/android/sample/toggleiconview/MainActivity.kt b/sample/src/main/java/og/android/sample/toggleiconview/MainActivity.kt index 502fb65..01d6cc8 100644 --- a/sample/src/main/java/og/android/sample/toggleiconview/MainActivity.kt +++ b/sample/src/main/java/og/android/sample/toggleiconview/MainActivity.kt @@ -1,8 +1,8 @@ package og.android.sample.toggleiconview import android.os.Bundle +import android.util.Log import android.widget.LinearLayout -import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import og.android.lib.toggleiconview.ToggleIconView @@ -47,12 +47,9 @@ class MainActivity : AppCompatActivity() { toggleIconView.toggle() } - toggleIconView.setOnCheckedChangeListener { _: ToggleIconView, isChecked: Boolean -> - Toast.makeText( - this, - "onCheckedChanged: $isChecked", - Toast.LENGTH_SHORT - ).show() + toggleIconView.setOnCheckedChangeListener { view: ToggleIconView, _: Boolean -> + val value = "[${view::class.qualifiedName.toString()}:onCheckedChanged] isChecked: ${toggleIconView.isChecked()}" + Log.d("TOGGLEICONVIEW_SAMPLE", value) } } } diff --git a/sample/src/main/res/layout/activity_main.xml b/sample/src/main/res/layout/activity_main.xml index 0970f9e..35213ec 100644 --- a/sample/src/main/res/layout/activity_main.xml +++ b/sample/src/main/res/layout/activity_main.xml @@ -11,6 +11,16 @@ android:layout_height="wrap_content" android:orientation="vertical"> + +