Page Curl анимация, которую я использую.
Я хотел спросить Харизма, как мне изменить изображения после того, как все они нарисованы один раз.
Например, У меня есть 10 изображений, нарисованных в первом экземпляре на 10 страницах, и теперь, когда я возвращаюсь из какого-то другого занятия, я хочу, чтобы на тех же страницах отображались измененные 10 страниц в соответствии с (теперь) новыми / измененными данными. В настоящее время я получаю свой новый / измененные данные добавляются к первым 10 страницам, и таким образом я получаю результат в 20 страниц, а не только в 10.
Может ли кто-нибудь, работающий с анимацией Curl, помочь мне в этом?
Благодарю в ожидании !!
private class BitmapProvider implements CurlView.BitmapProvider {
@Override
public Bitmap getBitmap(int width, int height, int index) {
// LinearLayout linearLayout=(LinearLayout) findViewById(R.id.linearLayout1);
Bitmap b = Bitmap.createBitmap(width,height,
Bitmap.Config.ARGB_8888);
b.eraseColor(Color.BLACK);
Canvas c = new Canvas(b);
TextView textPageCount= new TextView(AllQuotesActivity.this);
textPageCount.setText((index+1) +" of " + (allQuotes.size()));
textPageCount.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.BOTTOM);
textPageCount.setTextColor(Color.WHITE);
textPageCount.setTypeface(Typeface.createFromAsset(getAssets(), "Samba.ttf"));
textPageCount.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14);
textPageCount.setLayoutParams(new LayoutParams(c.getWidth(),c.getHeight()));
fLayout.addView(textPageCount);
fLayout.setBackgroundColor(Color.BLACK);
fLayout.measure(c.getWidth(), c.getHeight());
fLayout.layout(0, 0, c.getWidth(), c.getHeight());
fLayout.draw(c);
return b;
}
// I actually call all of these instantiating methods while refreshing the CurlView in hopes that it wouldn't Append the Pages and reDraw it.
mCurlView = (CurlView) findViewById(R.id.curl);
mCurlView.sendClassInstance(this);
mCurlView.setBitmapProvider(new BitmapProvider());
mCurlView.setSizeChangedObserver(new SizeChangedObserver());
mCurlView.setCurrentIndex(index);
mCurlView.setAllowLastPageCurl(false);
// mCurlView.setBackgroundColor(0xFF202830);
mCurlView.setBackgroundColor(Color.BLACK);