我有一个产品列表,我从webservice检索,当应用程序第一次打开时,应用程序从webservice获取产品列表.我想将此列表保存到共享首选项.
List medicineList = new ArrayList();
产品类别是:
public class Product {
public final String productName;
public final String price;
public final String content;
public final String imageUrl;
public Product(String productName, String price, String content, String imageUrl) {
this.productName = productName;
this.price = price;
this.content = content;
this.imageUrl = imageUrl;
}
}
如何保存此列表,每次都不会从webservice请求?