
鸿蒙APP开发
luo_sen
这个作者很懒,什么都没留下…
展开
-
鸿蒙-触摸屏事件
m_button.setTouchEventListener(new TouchEventListener() { @Override public boolean onTouchEvent(Component component, TouchEvent touchEvent) { int action = touchEvent.getAction() ; return true; ..原创 2022-01-24 17:31:50 · 590 阅读 · 0 评论 -
鸿蒙-获取横竖屏状态
protected AbilityInfo.DisplayOrientation getRotation() { Optional<Display> defaultDisplay = DisplayManager.getInstance().getDefaultDisplay(this); int rotation = defaultDisplay.get().getRotation(); if(rotation == 0) .原创 2022-01-24 14:34:14 · 675 阅读 · 0 评论 -
鸿蒙-定时器
Context context = getContext(); Timer timer = new Timer(); timer.schedule(new TimerTask() { @Override public void run() { context.getUITaskDispatcher().delayDispatch(new Runnable() { @O..原创 2022-01-24 14:30:05 · 879 阅读 · 0 评论 -
鸿蒙-线程(二)
public void StartRefreshData() { Thread t1 = new Thread(new AutoReadDataImpl()); t1.start(); }public class AutoReadDataImpl implements Runnable{ public AutoReadDataImpl( ) { } @Override pub..原创 2022-01-24 14:25:58 · 196 阅读 · 0 评论 -
鸿蒙开发- 线程(一)
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (c) 2021 Huawei Device Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of t.原创 2022-01-24 14:15:32 · 563 阅读 · 0 评论 -
打开5555调试端口
1、找到 hdc.exe工具2、命令行中执行: hdc tmode port 5555原创 2021-11-08 19:52:45 · 2881 阅读 · 0 评论