我要在鸿蒙上实现和Android一样的某个自定义图片库,鸿蒙继承自Image,Android继承自ImageView.Android的imageview中有setImageDrawable()方法,鸿蒙里面有setImageElement()方法.Android版本的自定义ImageView的setImageDrawable()会被自动调用,鸿蒙的自定义Image的setImageElement()不会被自动调用,这是为什么,让我的后续流程很难继续.
鸿蒙Android的手势有下面这些,鸿蒙有与之对应的手势吗RotateGestureDetectormRotateDetector;GestureDetectormDetector;ScaleGestureDetectormScaleDetector;
手势鸿蒙Toast能指定弹出的位置吗!目前有一个需求,需要在指定位置弹出弹出框!原本使用popupwindow实现,问题是,我们的popupwindow的弹出时间需要维持三秒,如果我在popupwindow弹出的三秒内执行其它操作会出问题(普通Toast不会有这个问题)!求一个拥有指定位置弹出的Toast,非自定义popupwindow.
鸿蒙自定义Toast通过动态获取stacklayout布局内的子控件,通过设置setmargin改变该控件在stacklayout内部的位置text是Text控件StackLayout.LayoutConfigstackLayout(StackLayout.LayoutConfig)text.getLayoutConfig();stackLayout.alignmentTableLayout.Alignment.ALIGNMENTUNDEFINED;stackLayout.setMarginLeft(AttrHelper.vp2px(15,MainAbilitySlice.this));text.setLayoutConfig(stackLayout);但是没有效果.text位置并未发生改变求正确的完整做法
鸿蒙我在devstudio的library中引用本地har库,build时报如下错误:Error:TheHARgeneratedbythelibraryprojectiscorrupted.ThedependenciesofthelocalHARfilearenotsupportedduringHARbuildingbecausetheclassesandHarmonyOSresourcesinthelocalHARfiledependenciesarenotpackagedinthegeneratedHAR怎么向Android一样,在library库的gradle调用repositories{flatDir{dirs'libs'}}就可以正常的build和运行
harmonyInputMethodAbility怎么使用我在鸿蒙上是InputMethodAbilityinputnewInputMethodAbility(){protectedKeyboardDelegateonCreateKeyboardInterface(){}};发现onCreateKeyboardInterface()并未被调用.具体用法是怎样的,求详细用法
鸿蒙IntentintentnewIntent(Intent.ACTIONVIEW,Uri.parse("https:www.baidu.com"));this.startActivity(intent);鸿蒙是怎么样的
鸿蒙 网页Android有下面这些输入输出相关管理importandroid.view.inputmethod.BaseInputConnection;importandroid.view.inputmethod.EditorInfo;importandroid.view.inputmethod.InputConnection;importandroid.view.inputmethod.InputMethodManager;鸿蒙有哪些与之对应的东西吗
鸿蒙Android有onInterceptTouchEvent(MotionEventev)处理事件拦截,鸿蒙有相对应的方法吗
事件分发拦截HarmonyOS的ListContainer怎么滚动到指定位置,例如要滚动到Position10的位置
harmony鸿蒙横竖屏切换怎么监听状态!我需要根据用户的切换横竖屏,调整某些参数,现在用什么方式进行横竖屏监听合适,求详细步骤
鸿蒙横竖屏鸿蒙自定义Listcontainer中获取getComponentAt(i)得到了null,不清楚为啥获取子Component会得到null
自定义viewAndroid中的alpha动画是这个AlphaAnimation,鸿蒙的alpha动画是哪一个
动画SurfaceProvider子线程调用主线程进行绘制有延迟(绘制相关操作是放在onDraw()里面,目前是停止绘制,打断子线程,绘制停止会延后两秒左右)请问有什么更好的方式.(如果直接放在子线程绘制,会没有显示.)
HarmonyOS, 线程两个AbilitySlice进行跳转时,怎么finish当前的AbilitySlice!类似于一个Activity跳到另一个activity,finish当前activity
harmonyOS鸿蒙自定义SurfaceProviderOverrideprotectedvoidonRender(Canvascanvas,longmillisPassed){floatoffsetmillisPassedoffsetSpeed;HiLog.info(label,"WLVonRender"+(canvasnull)+"paint"+(paintnull));Paintpaint1newPaint();paint1.setColor(Color.WHITE);canvas.drawCircle(200,200,130,paint1);HiLog.info(label,"WLVonRender02");}有输出日志,但是看不到绘制的东西,哪位大神知道是啥原因吗
绘制不显示