什么是RoboSpice图书馆机器人 [英] What is RoboSpice Library in android

查看:171
本文介绍了什么是RoboSpice图书馆机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到了在线文档这里

我试过 ::

  • 在我有previously研究使用春图书馆,也 改造,AsyncHttp等
  • 在我理解,所有上述转换 JSON 响应 POJO
  • I have previously studying on using Spring Library,also Retrofit, AsyncHttp etc
  • I understood that all above convert JSON response to POJO

什么,我需要更多的信息 ::

  • 当我看到 Robospice 的文档,它看起来像一个包装 各地无论是改造 AsyncHttp
  • 是真的吗?
  • 因此,通过使用RoboSpice才能选择底层是 改造 AsyncHttp
  • 因此,如果出现这种情况RoboSpice使改造 AsyncHttp 等作为样板code,使开发更简单
  • When i see the documentation on Robospice it looks like a wrapper around either of Spring or Retrofit or AsyncHttp etc
  • Is it true ?
  • So by using RoboSpice can we select the underlying layer to be Spring or Retrofit or AsyncHttp etc
  • So if that happens RoboSpice makes Spring or Retrofit or AsyncHttp etc as BoilerPlate code and makes development easier

如果我是不正确的,请提供清晰的信息WRT这个

我是新来的机器人,请去容易与答案

I am new to android, Please go easy on with answers

推荐答案

我不是RoboSpice专家,但这里是它的功能我简单说明:

I'm not an expert on RoboSpice but here is my quick explanation of its function:

通常,在我们的应用程序,我们希望做的异步网络操作(从网址等获得的图像。)

Often in our app we would like to do Asynchronous network operations (get image from url etc.)

一个常用的方法是做一个AsyncTask的对象中的网络请求。

A common technique is to do the network request within an AsyncTask object.

的问题是,所述的AsyncTask对象未由活动的生命周期来处理。

The problem is that the AsyncTask object is not handled by the activity lifecycle.

在设备配置发生改变时(如旋转装置),将创建新的活动(见处理运行时更改)。创造了异步网络请求原来的活动,现在被破坏,但AsyncTask的仍然是工作。这是做网络现在也许尝试和更新了一些进度信息的用户界面的AsyncTask的(如:下载完成)。但AsyncTask的还是指现在已被破坏了原有的活性。我们需要的AsyncTask自身附加到新的活动。

When the device configuration change occurs (e.g. rotate device) a new activity is created (See Handling runtime changes). The original activity which created the Async network request is destroyed now but the AsyncTask is still working. The AsyncTask which is doing the networking will now maybe try and update the UI with some progress information (e.g. download has completed). But the AsyncTask still refers to the original activity which has been destroyed now. We need the AsyncTask to attach itself to the new activity.

据我了解,RoboSpice有助于解决这个问题。我不能RoboSpice的底层实现注释。

My knowledge is that RoboSpice helps solve this problem. I cannot comment on the underlying implementation of RoboSpice.

这篇关于什么是RoboSpice图书馆机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆