本文整理汇总了Java中org.zirco.events.EventConstants类的典型用法代码示例。如果您正苦于以下问题:Java EventConstants类的具体用法?Java EventConstants怎么用?Java EventConstants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EventConstants类属于org.zirco.events包,在下文中一共展示了EventConstants类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onFinished
import org.zirco.events.EventConstants; //导入依赖的package包/类
/**
* Set this item is download finished state. Trigger a finished download event.
*/
public void onFinished() {
mProgress = 100;
mRunnable = null;
mIsFinished = true;
updateNotificationOnEnd();
EventController.getInstance().fireDownloadEvent(EventConstants.EVT_DOWNLOAD_ON_FINISHED, this);
}
示例2: onDownloadEvent
import org.zirco.events.EventConstants; //导入依赖的package包/类
@Override
public void onDownloadEvent(String event, Object data) {
if (event.equals(EventConstants.EVT_DOWNLOAD_ON_FINISHED)) {
DownloadItem item = (DownloadItem) data;
if (item.getErrorMessage() == null) {
Toast.makeText(this, getString(R.string.Main_DownloadFinishedMsg), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, getString(R.string.Main_DownloadErrorMsg, item.getErrorMessage()), Toast.LENGTH_SHORT).show();
}
}
}
示例3: onStart
import org.zirco.events.EventConstants; //导入依赖的package包/类
/**
* Trigger a start download event.
*/
public void onStart() {
createNotification();
EventController.getInstance().fireDownloadEvent(EventConstants.EVT_DOWNLOAD_ON_START, this);
}
示例4: onProgress
import org.zirco.events.EventConstants; //导入依赖的package包/类
/**
* Set the current progress. Trigger a progress download event.
* @param progress The current progress.
*/
public void onProgress(int progress) {
mProgress = progress;
EventController.getInstance().fireDownloadEvent(EventConstants.EVT_DOWNLOAD_ON_PROGRESS, this);
}