Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
Hello UTS
提交
dc9d323f
H
Hello UTS
项目概览
DCloud
/
Hello UTS
通知
1595
Star
27
Fork
9
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
2
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
Hello UTS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
2
Issue
2
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
dc9d323f
编写于
4月 19, 2023
作者:
杜庆泉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
nativepage 部分报错问题修复
上级
c14b2986
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
14 deletion
+12
-14
uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
...modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
+3
-3
uni_modules/uts-nativepage/utssdk/app-android/index.uts
uni_modules/uts-nativepage/utssdk/app-android/index.uts
+9
-11
未找到文件。
uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts
浏览文件 @
dc9d323f
...
...
@@ -19,7 +19,7 @@ export class DoAppWidget extends AppWidgetProvider {
appWidgetManager: AppWidgetManager,
appWidgetIds: IntArray
):void{
console.log("
dqqdo", "
周期更新函数被触发")
console.log("周期更新函数被触发")
// There may be multiple widgets active, so update all of them
for (appWidgetId in appWidgetIds) {
updateAppWidget(context, appWidgetManager, appWidgetId)
...
...
@@ -28,12 +28,12 @@ export class DoAppWidget extends AppWidgetProvider {
override onEnabled(_context: Context):void{
// Enter relevant functionality for when the first widget is created
console.log("
dqqdo", "
桌面组件被添加")
console.log("桌面组件被添加")
}
override onDisabled(_context: Context):void{
// Enter relevant functionality for when the last widget is disabled
console.log("
dqqdo", "
桌面组件被移除")
console.log("桌面组件被移除")
}
}
...
...
uni_modules/uts-nativepage/utssdk/app-android/index.uts
浏览文件 @
dc9d323f
...
...
@@ -23,10 +23,7 @@ import {
import Service from 'android.app.Service';
import System from 'java.lang.System';
import Looper from 'android.os.Looper';
import Class from 'java.lang.Class';
import Exception from 'java.lang.Exception';
import PackageManager from 'android.content.pm.PackageManager';
import ResolveInfo from 'android.content.pm.ResolveInfo';
import RecyclerView from 'androidx.recyclerview.widget.RecyclerView';
import TextView from 'android.widget.TextView';
...
...
@@ -195,9 +192,10 @@ class CustomThread extends Thread{
class FruitAdapter extends RecyclerView.Adapter<FruitAdapter.ViewHolder>{
mFruitList: Array<String>
mFruitList: Array<String>
= []
constructor(param:Array<String>){
super()
mFruitList = param
}
...
...
@@ -240,24 +238,24 @@ class DemoActivity extends Activity{
super.onCreate(savedInstanceState)
this.setContentView(R.layout.demo_activity);
let btn_start_service_front = findViewById<Button>(R.id.btn_start_service_front);
let btn_start_service_front =
this.
findViewById<Button>(R.id.btn_start_service_front);
btn_start_service_front.setOnClickListener(new StartServiceListener());
let btn_start_screen_listen = findViewById<Button>(R.id.btn_start_screen_listen);
let btn_start_screen_listen =
this.
findViewById<Button>(R.id.btn_start_screen_listen);
btn_start_screen_listen.setOnClickListener(new StartBroadcastListener());
let btn_start_thread = findViewById<Button>(R.id.btn_start_thread);
let btn_start_thread =
this.
findViewById<Button>(R.id.btn_start_thread);
btn_start_thread.setOnClickListener(new StartThreadListener());
let btn_finish_activity = findViewById<Button>(R.id.btn_finish_activity);
let btn_finish_activity =
this.
findViewById<Button>(R.id.btn_finish_activity);
btn_finish_activity.setOnClickListener(new ActivityFinishListener(this));
let recyclerView = findViewById<RecyclerView>(R.id.recycler_view)
let layoutManager = LinearLayoutManager(this);
let recyclerView =
this.
findViewById<RecyclerView>(R.id.recycler_view)
let layoutManager =
new
LinearLayoutManager(this);
recyclerView.setLayoutManager(layoutManager);
let fruitAdapter = FruitAdapter(arrayListOf("香蕉","苹果","大鸭梨"));
let fruitAdapter =
new
FruitAdapter(arrayListOf("香蕉","苹果","大鸭梨"));
recyclerView.setAdapter(fruitAdapter);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录