热门问题
待回答
最新问题
热门回答
  • 1

    回答

    1090

    浏览
    HarmonyOS 下拉刷新,上拉加载更多的控件最小化demo

    单列表页面,下拉刷新,上拉加载exportinterfaceMessageListResponse{records:Records[];total:number;size:number;current:number;pages:number;}exportinterfaceRecords{id:number;msgType:string;msgTitle:string;msgContent:string;createTime:string;extraMsg:string;redirectType:number;redirectUrl:string;status:number;imageUrl:string;showTag:number;headUrl:string;myContent:string;headName:string;headFlag:boo...

    HarmonyOS
      aquaa 进行了回答 • 2024-12-25 14:45:54
  • 1

    回答

    844

    浏览
    HarmonyOS 监听键盘显示隐藏无效

    try{inputMethodEngine.getInputMethodEngine().on('keyboardShow',(){console.log('inputMethodEnginekeyboardShow.');});inputMethodEngine.getInputMethodEngine().on('keyboardHide',(){console.log('inputMethodEnginekeyboardHide.');});}catch(err){console.error(FailedtoInputMethodEngine:${JSON.stringify(err)});}

    HarmonyOS
      fox280 进行了回答 • 2024-12-25 14:45:32
  • 1

    回答

    1734

    浏览
    HarmonyOS 自带输入法的输入问题

    我们的应用是工具类的App,多数情况下,需要用户输入参数,输入内容包含(+.数字),HarmonyOS自带的键盘的InputType,没法同时满足我们的需求,自定义键盘会出现遮挡弹框的问题,用正则匹配的话,用户需要来回切换成数字键盘,体验非常不好,能不能再增加一种方式,让我们能同时输入(+.数字)

    HarmonyOS
      put_get 进行了回答 • 2024-12-25 14:45:27
  • 1

    回答

    1809

    浏览
    HarmonyOS Navigation跳转新的页面是空白页

    使用letpathInfo:NavPathInfonewNavPathInfo('MySetting',null)this.pageInfos.pushPath(pathInfo,true);进行路由跳转到MySetting页面,MySetting页面显示空白页,debug会走到MySetting里,但是显示空白页。

    HarmonyOS
      zxjiu 进行了回答 • 2024-12-25 14:45:10
  • 1

    回答

    971

    浏览
    HarmonyOS 输入框获取焦点后无法弹出
    HarmonyOS
      Excelsior_abit 进行了回答 • 2024-12-25 14:45:07
  • 1

    回答

    1287

    浏览
    HarmonyOS 启动页背景图适配

    设置startIcon和自己页面的一个splash控件为同一张背景图后,会闪烁,startIcon展示的图片偏小,有没有启动页适配方案相关文档ComponentexportstructBrandSplash{build(){buildSplash()}}BuilderexportfunctionbuildSplash(){Image($r('app.media.splashbg')).width('100%').height('100%').objectFit(ImageFit.Contain).backgroundColor($r('app.color.Wh0u'))}module.json5配置"name":"EntryAbility","srcEntry":".etsentryab...

    HarmonyOS
      Excelsior_abit 进行了回答 • 2024-12-25 14:45:05
  • 1

    回答

    735

    浏览
    HarmonyOS 外部类方法如何改变组件状态变量

    想在JSSDK.ets中的hideTitle方法将webTitle置空。

    HarmonyOS
      aquaa 进行了回答 • 2024-12-25 14:44:49
  • 1

    回答

    1227

    浏览
    HarmonyOS 自定义弹窗控制问题

    CustomDialogexportdefaultstructCustomDialogWidget{controller:CustomDialogControlleraboutToAppear(){}build(){Column(){}.width('100%').height('100%').backgroundColor($r('app.color.searchhintcolor')).onClick((){if(this.controller){this.controller.close()}})}}上面是自定义的一个弹窗,按照官方提供的方法在页面上面打开,现在没有办法关闭也就是代码里面的controller这个属性一直是空值,controller要在哪里进行赋值然后用来关闭弹窗。

    HarmonyOS
      superinsect 进行了回答 • 2024-12-25 14:44:46
  • 1

    回答

    1152

    浏览
    HarmonyOS 操作首选项或数据库,耗时操作放taskpool里该如何使用

    在项目开发过程中,需要频繁操作首选项或者数据库的操作,基于这种考虑,把这些操作放taskpool里执行了,但发现像首选项这类需要上下文context进行初始化的,已经在主工程初始化了,但放taskpool里会报错,提示获取不到context上下文对象,排查后发现这应该是taskpool内存隔离导致的原因,所以想咨询一下这种情况下应该怎么处理?

    HarmonyOS
      shlp 进行了回答 • 2024-12-25 14:44:23
  • 1

    回答

    660

    浏览
    HarmonyOS 是否有比较简单的方法实现二级列表
    HarmonyOS
      zxjiu 进行了回答 • 2024-12-25 14:43:59
  • 1

    回答

    1035

    浏览
    HarmonyOS Span不支持n换行

    Span不支持\n换行,如何实现span换行控制呢

    HarmonyOS
      shlp 进行了回答 • 2024-12-25 14:43:59
  • 1

    回答

    704

    浏览
    HarmonyOS watch不能监听provide

    Watch("tagNameChange")ProvidetagName:string""Watch("showOnPageChange")ProvideisShowOnPage:booleanfalsewatch不能监听provide会编译错误,如何解决?

    HarmonyOS
      FengTianYa 进行了回答 • 2024-12-25 14:43:41
  • 1

    回答

    763

    浏览
    HarmonyOS 同样布局短文案没问题,长文案显示异常

    Flex({direction:FlexDirection.Row,alignItems:ItemAlign.Center}){Row(){Text('一套代码工程,一次开发上架,多端按需部署,为用户呈现多设备统一且卓越的使用体验。').maxLines(1).fontSize(12).fontWeight(FontWeight.Medium).fontColor(ChannelSkinTools.getRealColor(this.item.fontColor,ColorConst.STR472CA3)).flexShrink(1)Image($r('app.media.iconvipmore3')).width(7).height(10).margin({left:3}).flexShrink(0)....

    HarmonyOS
      FengTianYa 进行了回答 • 2024-12-25 14:43:38
  • 1

    回答

    677

    浏览
  • 1

    回答

    1100

    浏览
    HarmonyOS 自定义弹窗CustomDialog 问题

    在第一个page打开自定义CustomDialog中点击dialog的超链接跳转到第二个page,第一个page的CustomDialog还在顶层;怎么覆盖第一个page的自定义弹窗?

    HarmonyOS
      Heiang 进行了回答 • 2024-12-25 14:43:35
  • 1

    回答

    1137

    浏览
    HarmonyOS APP分模块开发以及部署成元服务的方案
    HarmonyOS
      Heiang 进行了回答 • 2024-12-25 14:43:33
  • 1

    回答

    751

    浏览
    HarmonyOS 怎么能在NavDestination() 的onHidden 方法 中知道 是因为【页面压栈】还是【退到后台】这两种情况呀?

    通过NN方式跳转视图时,在Push下一个页面时,会触发NavDestination()的onHidden方法,但当页面退到后台时,也会触发onHidden方法,能么能在onHidden方法中知道是因为【页面压栈】还是【退到后台】这两种情况呀?官网说的windowStage.on和appManager.getRunningProcessInformation都比NavDestination()的onHidden慢。https:developer.huawei.comconsumercndocharmonyosfaqsV5faqsability101V5

    HarmonyOS
      put_get 进行了回答 • 2024-12-25 14:43:28
  • 1

    回答

    1037

    浏览
    HarmonyOS 数组对象数据刷新

    Array数组中对象中的属性发生变化,界面未刷新

    HarmonyOS
      shlp 进行了回答 • 2024-12-25 14:43:22
  • 1

    回答

    665

    浏览
    HarmonyOS Scroll包裹Tabs无法整个跟着联动

    代码如下:build(){Column(){this.topHeaderView()Scroll(){Column(){Tabs({index:this.currentIndex,controller:this.controller}){TabContent(){List({space:10}){ForEach(this.mTestList,(s:string){ListItem(){Column(){Text("其实")Text(s)Text("结束")}.width("100%").height(60).backgroundColor($r('app.color.cwhite')).borderWidth(1).borderColor($r('app.color.cffff5f0f'))}})}.listDirection(Axis.Vertical).enab...

    HarmonyOS
      superinsect 进行了回答 • 2024-12-25 14:43:15
  • 1

    回答

    1309

    浏览
    HarmonyOS navigation跳转页面为空白页

    log日志提示:072408:40:22.4204812448124C03922AceNavigationcom.cooper.demoE[navigationrouteohos.cpp(GetRouteItemFromBundle)(100000:100000:scope)]can'tfindnameinconfigfile:pageOne072408:40:22.4204812448124C03922AceNavigationcom.cooper.demoE[navigationrouteohos.cpp(LoadPage)(100000:100000:scope)]getroutenamefailed072408:40:22.4204812448124C03922AceNavigationcom.cooper.demoE[jsnavigationstack.cpp(LoadDestination)(100000:100000:scope)]loadpagefailed:pageOne

    HarmonyOS
      shlp 进行了回答 • 2024-12-25 14:43:07
  • 1

    回答

    768

    浏览
    HarmonyOS pad小窗适配如何实现
    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-25 14:42:53
  • 1

    回答

    1097

    浏览
    HarmonyOS 子组件调用父组件的方法demo
    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-25 14:42:47
  • 1

    回答

    721

    浏览
    HarmonyOS 应用怎么禁用分屏
    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-25 14:42:34
  • 1

    回答

    684

    浏览
    HarmonyOS tabbar跳转问题

    Tab项,从第一个tab直接切换到第三个tab时,会触发第二个tab内容的loading框显示

    HarmonyOS
      aquaa 进行了回答 • 2024-12-25 14:42:14
  • 1

    回答

    1048

    浏览
    HarmonyOS 多张画布横向合成一张图片

    需求是期望将多张画布横向合并成一张图片并保存,代码如下:如何合成呢EntryComponentstructNewCanvasPage{canvas:CanvasRenderingContext2DnewCanvasRenderingContext2D();canvas2:CanvasRenderingContext2DnewCanvasRenderingContext2D();canvas3:CanvasRenderingContext2DnewCanvasRenderingContext2D();build(){Column(){Row(){Canvas(this.canvas).layoutWeight(1).height('30%').backgroundColor('ffff00').onReady((){th...

    HarmonyOS
      shlp 进行了回答 • 2024-12-25 14:42:07
  • 1

    回答

    1879

    浏览
    HarmonyOS 应用如何禁止分屏、禁止悬浮窗

    禁止使用分屏、悬浮窗等多窗口模式,考试场景防作弊

    HarmonyOS
      put_get 进行了回答 • 2024-12-25 14:42:04
  • 1

    回答

    1039

    浏览
    HarmonyOS window之间的关系和如何监听window的创建

    https:developer.huawei.comconsumercndocharmonyosguidesV5applicationwindowstageV5根据窗口window的相关api,应用可以通过WindowStage.createSubWindow、window.create、window.createWindow来创建窗口和子窗口。下列问题请教一下:1、WindowStage.getMainWindow获取的window和以上接口创建的window是什么关系?2、请问应用如何监听的window的创建,以及如何获取到这些app自主创建的窗口实例?3、如何获取到应用当前最上层的...

    HarmonyOS
      Excelsior_abit 进行了回答 • 2024-12-25 14:42:01
  • 1

    回答

    1243

    浏览
  • 1

    回答

    3846

    浏览
    HarmonyOS 手机重置数据恢复和深度格式化

    (1)HarmonyOS手机重置后存储空间的内容如何恢复?(2)以及如何进行数据不可恢复的深度格式化操作?

    HarmonyOS
      Heiang 进行了回答 • 2024-12-25 14:41:54
  • 1

    回答

    1534

    浏览
    HarmonyOS 子窗口要如何设置成横屏
    HarmonyOS
      put_get 进行了回答 • 2024-12-25 14:41:51
3.8w问题, 4.1w人参与
94%的提问收到了回答

优秀答主

  • 回答了3个问题,0个赞同
  • 回答了3个问题,0个赞同
  • 回答了3个问题,1个赞同
  • 回答了2个问题,0个赞同
  • 回答了2个问题,1个赞同
  • 写回答 帮助更多的人