Back to project page iPhoroidUI-demo.
The source code is released under:
Apache License
If you think the Android project iPhoroidUI-demo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright (c) 2011 by KLab Inc., All rights reserved. *// www . ja v a2 s .c om * Programmed by Naohide Sano */ package org.klab.ui_demo.dao; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.klab.ui_demo.model.Item; /** * IF002. * PlayroomItem?DAO * ??????????????????????????????????. * * @author <a href="mailto:sano-n@klab.jp">Naohide Sano</a> (sano-n) * @version 0.00 2011/06/16 sano-n initial version <br> */ public class ListViewItemDao extends ItemDao { public static int PAGE_SIZE = 10; /** ???????????????????? */ private static ListViewItemDao instance = new ListViewItemDao(); /** * ????????????????? */ public static ListViewItemDao getInstance() { return instance; } /** * ?????????offset??????????????????????????. * ???????????????? Constants.MAX_SIZE_AT_ONCE ???????????????. * * Gets 10 of items */ public List<Item> getItems(int offset) throws IOException { return getItems(offset, PAGE_SIZE); } /** * ?????????offset??????????????????????????. * ?????????????????? size ???????????????. * * Gets size of items */ public List<Item> getItems(int offset, int size) throws IOException { List<Item> result = new ArrayList<Item>(); for (int i = offset; i < Math.min(offset + size, 99); i++) { result.add(newItem(i)); } return result; } } /* */