MD5 校验值:195005882709ac21163d7a1b97aeec73
DelayHandler.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package io.DelayHandler; import android.os.Handler; import com.google.appinventor.components.annotations.DesignerComponent; import com.google.appinventor.components.annotations.SimpleEvent; import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.annotations.SimpleObject; import com.google.appinventor.components.common.ComponentCategory; import com.google.appinventor.components.runtime.AndroidNonvisibleComponent; import com.google.appinventor.components.runtime.ComponentContainer; import com.google.appinventor.components.runtime.EventDispatcher; import kawa.lang.SyntaxForms; @DesignerComponent(category = ComponentCategory.EXTENSION, description = "DelayHandler extension<br><br><a href='https://drive.google.com/file/d/1RBPjjhpHAzhvqtOKAiuhEwMVemd2uJDK/view?usp=sharing' target='pramabTAB'>Download</a>  <a href='https://community.kodular.io/t/delayhandler-extension-may-be-similar-but-definitely-different/74079' target='pramanTAB'>How to use ?</a><br><br>It is created by Hema Srinivas, India.", helpUrl = "https://community.kodular.io/t/delayhandler-extension-may-be-similar-but-definitely-different/74079", iconName = "https://drive.google.com/uc?export=view&id=1kagAFBfLfBe_XF4s9_4KKkTG1KFbVzqa", nonVisible = SyntaxForms.DEBUGGING, version = 1) @SimpleObject(external = SyntaxForms.DEBUGGING) public class DelayHandler extends AndroidNonvisibleComponent { private ComponentContainer container; public DelayHandler(ComponentContainer componentContainer) { super(componentContainer.$form()); } @SimpleEvent(description = "After delay") public void AfterDelay(String str) { EventDispatcher.dispatchEvent(this, "AfterDelay", str); } @SimpleFunction(description = "Set delay in milli seconds") public void SetDelayForMilliSeconds(int i, final String str) { new Handler().postDelayed(new Runnable() { @Override public void run() { DelayHandler.this.AfterDelay(str); } }, i); } @SimpleFunction(description = "Set delay in minutes") public void SetDelayForMinutes(int i, final String str) { new Handler().postDelayed(new Runnable() { @Override public void run() { DelayHandler.this.AfterDelay(str); } }, i * 60000); } @SimpleFunction(description = "Set delay in seconds") public void SetDelayForSeconds(int i, final String str) { new Handler().postDelayed(new Runnable() { @Override public void run() { DelayHandler.this.AfterDelay(str); } }, i * 1000); } }