diff --git a/.gitignore b/.gitignore index b378be6..2583fd5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /gradle /gradlew /gradlew.bat +/.idea/ diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index e497da9..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/java/com/yechaoa/app/MainActivity.kt b/app/src/main/java/com/yechaoa/app/MainActivity.kt index bc9d943..46773b7 100644 --- a/app/src/main/java/com/yechaoa/app/MainActivity.kt +++ b/app/src/main/java/com/yechaoa/app/MainActivity.kt @@ -36,21 +36,21 @@ class MainActivity : AppCompatActivity() { set.add("-----" + array[i]) } - mBinding.button.setOnClickListener { + mBinding.btnStrSet.setOnClickListener { SpUtil.setStringSet("testStringSet", set) } - mBinding.button2.setOnClickListener { + mBinding.btnStrSet2.setOnClickListener { val stringSet = SpUtil.getStringSet("testStringSet") LogUtil.i(stringSet.toString()) } - mBinding.showLoading.setOnClickListener { + mBinding.btnShowLoading.setOnClickListener { YUtils.showLoading(this, "test") LogUtil.i("" + YUtils.loadingIsShowing()) } - mBinding.hideLoading.setOnClickListener { + mBinding.btnHideLoading.setOnClickListener { ToastUtil.show("取消loading") YUtils.hideLoading() LogUtil.i("" + YUtils.loadingIsShowing()) diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index d209eea..9646a78 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -14,25 +14,25 @@ android:text="Hello World!" />