File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
src/main/java/com/hjq/toast/demo Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ android {
55
66 defaultConfig {
77 applicationId " com.hjq.toast.demo"
8- minSdkVersion 16
8+ minSdkVersion 17
99 targetSdkVersion 34
1010 versionCode 1280
1111 versionName " 12.8"
@@ -62,13 +62,13 @@ dependencies {
6262 implementation ' com.google.android.material:material:1.4.0'
6363
6464 // 标题栏框架:https://github.com/getActivity/TitleBar
65- implementation ' com.github.getActivity:TitleBar:10.5 '
65+ implementation ' com.github.getActivity:TitleBar:10.6 '
6666
6767 // 权限请求框架:https://github.com/getActivity/XXPermissions
68- implementation ' com.github.getActivity:XXPermissions:20 .0'
68+ implementation ' com.github.getActivity:XXPermissions:23 .0'
6969
7070 // 悬浮窗框架:https://github.com/getActivity/EasyWindow
71- implementation ' com.github.getActivity:EasyWindow:10.3 '
71+ implementation ' com.github.getActivity:EasyWindow:12.0 '
7272
7373 // 内存泄漏捕捉:https://github.com/square/leakcanary
7474 debugImplementation ' com.squareup.leakcanary:leakcanary-android:2.12'
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ public void run() {
162162 @ Override
163163 public void run () {
164164 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .R ) {
165- if (XXPermissions .isGranted (MainActivity .this , Permission .SYSTEM_ALERT_WINDOW )) {
165+ if (XXPermissions .isGrantedPermissions (MainActivity .this , Permission .SYSTEM_ALERT_WINDOW )) {
166166 Toaster .show (R .string .demo_show_toast_in_background_state_result_1 );
167167 } else {
168168 Toaster .show (R .string .demo_show_toast_in_background_state_result_2 );
@@ -176,11 +176,11 @@ public void run() {
176176
177177 public void combinationEasyWindowShow (View v ) {
178178 new EasyWindow <>(this )
179- .setDuration (1000 )
179+ .setWindowDuration (1000 )
180180 // 将 Toaster 中的 View 转移给 EasyWindow 来显示
181181 .setContentView (Toaster .getStyle ().createView (getApplication ()))
182182 .setAnimStyle (android .R .style .Animation_Translucent )
183- .setText (android .R .id .message , R .string .demo_combining_window_framework_use_result )
183+ .setTextByTextView (android .R .id .message , R .string .demo_combining_window_framework_use_result )
184184 .setGravity (Gravity .BOTTOM )
185185 .setYOffset ((int ) TypedValue .applyDimension (TypedValue .COMPLEX_UNIT_DIP , 50 , getResources ().getDisplayMetrics ()))
186186 .show ();
You can’t perform that action at this time.
0 commit comments