#### first step
<bf.fc.page.curl.view.CurlView
android:id="@+id/curl_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
TextPageProvider textPageProvider = new TextPageProvider();
textPageProvider.setStrings(contents);
textPageProvider.setBackStrings(backContents);
curlView.setPageProvider(textPageProvider);
ImagePageProvider imagePageProvider = new ImagePageProvider();
imagePageProvider.setBitmaps(bitmaps);
imagePageProvider.setBackBitmaps(backBitmaps);
curlView.setPageProvider(imagePageProvider);
public class TestPageProvider extends BasePageProvider {
@Override
public Object getItem(int index, boolean isBack) {
return null;
}
@Override
public void drawBitmap(Canvas c, Rect r, int index, boolean isBack) {
}
@Override
public int getPageCount() {
return 0;
}
}
public class PageProviderHandler extends BasePageProviderHandler {
public PageAdapterHandler(CurlView curlView) {
super(curlView);
}
@Override
public Object onLoading(int index, boolean isBack) {
return "loading。。。。。。";
}
@Override
public Object onError(int index, boolean isBack) {
return "error";
}
/**
* the method execute in background thread
*/
@Override
public Object fetchData(int index, boolean isBack, Object data) throws Exception {
// do something
}
}