1

我想打开ContentHandler以全屏显示图像。所以我使用以下代码全屏查看选定的图像

Invocation invocation = new Invocation(imageFilePath);  
invocation.setAction(ContentHandler.ACTION_OPEN);
Registry _registry = Registry .getRegistry(mypackagename.myuiapplication);
_registry.invoke(invocation);

上面的代码完美运行。但是当我全屏查看图像并退出应用程序时。但是我的应用程序会自行重新打开。

为什么我的应用程序会显示这种连线行为?

4

1 回答 1

1

我希望我得到了解决方案。应用程序等待调用响应。这是解决方案

Invocation invocation = new Invocation(imageFilePath);  
invocation.setAction(ContentHandler.ACTION_OPEN);
Registry _registry = Registry .getRegistry(mypackagename.myuiapplication);
_registry.setListener(responseListener);
registry.cancelGetResponse();
_registry.invoke(invocation);


private ResponseListener responseListener = new ResponseListener() {

    public void invocationResponseNotify(Registry registry) {
        registry.getResponse(false);
    }
};
于 2014-04-25T13:20:22.783 回答