From 195b72c7d4b9352bf9000eaaa0aae6c99c79713a Mon Sep 17 00:00:00 2001 From: duqingquan Date: Tue, 30 Jul 2024 12:01:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86uts=20?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=EF=BC=8C=E9=81=BF=E5=85=8D=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-advance/utssdk/app-android/index.uts | 5 ++--- uni_modules/uts-syntaxcase/utssdk/app-android/kotlinCode.kt | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/uni_modules/uts-advance/utssdk/app-android/index.uts b/uni_modules/uts-advance/utssdk/app-android/index.uts index 1a76bd4..63d4587 100644 --- a/uni_modules/uts-advance/utssdk/app-android/index.uts +++ b/uni_modules/uts-advance/utssdk/app-android/index.uts @@ -111,9 +111,8 @@ class AddUIRunnable implements Runnable { textView.setBackgroundColor(Color.RED) textView.setTag("helloText") textView.setGravity(Gravity.CENTER) - - let decorView = UTSAndroid.getUniActivity()!.window.decorView; - + + let decorView = UTSAndroid.getUniActivity()!.getWindow().getDecorView(); let frameContent = decorView.findViewById(android.R.id.content) let layoutParam = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); diff --git a/uni_modules/uts-syntaxcase/utssdk/app-android/kotlinCode.kt b/uni_modules/uts-syntaxcase/utssdk/app-android/kotlinCode.kt index c5063ad..8f04ab3 100644 --- a/uni_modules/uts-syntaxcase/utssdk/app-android/kotlinCode.kt +++ b/uni_modules/uts-syntaxcase/utssdk/app-android/kotlinCode.kt @@ -2,12 +2,14 @@ package uts.sdk.modules.utsSyntaxcase import android.os.Build import io.dcloud.uts.UTSAndroid - +import io.dcloud.uts.console object NativeCode { fun getPhoneInfo():String{ - return "${Build.BOARD}-${Build.USER}" + val ret = "${Build.BOARD}-${Build.USER}" + console.log("PhoneInfo",ret) + return ret } fun finishActivity(){ -- GitLab