From eb37322f14e6ed12a0db0f7fad1af81114a2ed80 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 25 Feb 2013 18:08:01 +0200 Subject: Temporary (one hopes) hack to get the actual view size down to SvpSalFrame Change-Id: I0c2a2301de1b0de71fc6724ff2af73fbf6b406ef --- .../src/org/libreoffice/android/experimental/desktop/Desktop.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'android') diff --git a/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java b/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java index 8d5b97de03c4..58fe555936da 100644 --- a/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java +++ b/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java @@ -132,6 +132,7 @@ public class Desktop /* implementend by vcl */ public static native void renderVCL(Bitmap bitmap); + public static native void setViewSize(int width, int height); /** * This class contains the state that is initialized once and never changes @@ -278,15 +279,15 @@ public class Desktop if (bootstrapContext == null) initBootstrapContext(); + Log.i(TAG, "onCreate - set content view\n"); + setContentView(new BitmapView()); + spawnMain(); } catch (Exception e) { e.printStackTrace(System.err); finish(); } - - Log.i(TAG, "onCreate - set content view\n"); - setContentView(new BitmapView()); } class BitmapView extends android.view.View @@ -305,6 +306,7 @@ public class Desktop if (mBitmap == null) { Log.i(TAG, "calling Bitmap.createBitmap(" + getWidth() + ", " + getHeight() + ", Bitmap.Config.ARGB_8888)"); mBitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888); + setViewSize(getWidth(), getHeight()); } renderVCL(mBitmap); canvas.drawBitmap(mBitmap, 0, 0, null); -- cgit