Search in sources :

Example 1 with FBReader

use of org.geometerplus.android.fbreader.FBReader in project FBReaderJ by geometer.

the class ZLAndroidWidget method onDraw.

@Override
protected void onDraw(final Canvas canvas) {
    final Context context = getContext();
    if (context instanceof FBReader) {
        ((FBReader) context).createWakeLock();
    } else {
        System.err.println("A surprise: view's context is not an FBReader");
    }
    super.onDraw(canvas);
    //		final int w = getWidth();
    //		final int h = getMainAreaHeight();
    myBitmapManager.setSize(getWidth(), getMainAreaHeight());
    if (getAnimationProvider().inProgress()) {
        onDrawInScrolling(canvas);
    } else {
        onDrawStatic(canvas);
        ZLApplication.Instance().onRepaintFinished();
    }
}
Also used : Context(android.content.Context) FBReader(org.geometerplus.android.fbreader.FBReader)

Aggregations

Context (android.content.Context)1 FBReader (org.geometerplus.android.fbreader.FBReader)1