summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-02-25 18:08:01 +0200
committerTor Lillqvist <tml@iki.fi>2013-02-25 18:08:58 +0200
commiteb37322f14e6ed12a0db0f7fad1af81114a2ed80 (patch)
tree1f37fe4c12ea85baeed3025ad02043b1c89b2d62 /android
parent320571bf701a092d0f2d15fd4589ae271802a03f (diff)
Temporary (one hopes) hack to get the actual view size down to SvpSalFrame
Change-Id: I0c2a2301de1b0de71fc6724ff2af73fbf6b406ef
Diffstat (limited to 'android')
-rw-r--r--android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java8
1 files changed, 5 insertions, 3 deletions
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);