Skip to content
Advertisement

Tag: huawei-developers

What is the equivalent of view.postDelayed(Runnable action, long delayMillis) in harmonyos?

I am creating a custom component in HarmonyOS using Java SDK, Where I have to perform some task after some delay with Component instance. In Android, we have postDelayed(Runnable action, long delayMillis) method in View class. So we can achieve above requirement as follow but, In HMOS java SDK, I seen there is no any api available for delay in

What is the alternative in Harmony OS for Nullable and NonNull annotations?

There are many arguments in my code which can take the value null. It would be helpful if there is a @Nullable and @NonNull annotation like the ones offered in Android via Annotation. Is there an alternative available in Harmony OS? Answer You can use org.jetbrains.annotations.Nullable & org.jetbrains.annotations.NotNull annotations available from jetbrains dependency, implementation ‘org.jetbrains:annotations:20.1.0’

Advertisement