[Libreoffice-commits] core.git: 2 commits - android/experimental
Jan Holesovsky
kendy at collabora.com
Fri Oct 10 05:33:36 PDT 2014
android/experimental/LOAndroid3/res/values/strings.xml | 4 ++--
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java | 9 +++++++++
android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java | 8 ++++++++
3 files changed, 19 insertions(+), 2 deletions(-)
New commits:
commit e147c5785f60506c58ba80455614bdbcdad18e61
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Oct 10 14:27:23 2014 +0200
android: Repaint when the orientation changes.
Change-Id: I150b22b7b1179c1adc7995a8547c7644ac25be28
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
index e5765e6..4c91542 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
@@ -26,6 +26,11 @@ public class LOKitThread extends Thread {
}
private boolean draw() {
+ if (mTileProvider == null || mApplication == null) {
+ // called too early...
+ return false;
+ }
+
RectF rect = new RectF(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight());
DisplayMetrics displayMetrics = LibreOfficeMainActivity.mAppContext.getResources().getDisplayMetrics();
mViewportMetrics = new ImmutableViewportMetrics(displayMetrics);
@@ -114,6 +119,8 @@ public class LOKitThread extends Thread {
draw();
break;
case LOEvent.SIZE_CHANGED:
+ // re-draw when the size has changed
+ draw();
break;
case LOEvent.CHANGE_PART:
changePart(event.getPartIndex());
@@ -130,3 +137,5 @@ public class LOKitThread extends Thread {
mEventQueue.clear();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
index 2a52d91..863157a 100644
--- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/LayerView.java
@@ -341,6 +341,14 @@ public class LayerView extends FrameLayout {
}
}
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+ super.onLayout(changed, left, top, right, bottom);
+ if (changed) {
+ setViewportSize(new IntSize(right - left, bottom - top));
+ }
+ }
+
private class SurfaceTextureListener implements TextureView.SurfaceTextureListener {
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
// We don't do this for surfaceCreated above because it is always followed by a surfaceChanged,
commit 84949ba280287a284cd01c0da1d9041f390a38a8
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Oct 10 12:56:57 2014 +0200
android: Improve the button descriptions.
Change-Id: I770065f7cb9aef3413cf8ebf860991147b6e14eb
diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml
index c98c0cd..857b00c 100644
--- a/android/experimental/LOAndroid3/res/values/strings.xml
+++ b/android/experimental/LOAndroid3/res/values/strings.xml
@@ -7,8 +7,8 @@
<string name="app_description">LibreOffice Viewer is a document viewer based on LibreOffice.</string>
<string name="app_credits">http://www.libreoffice.org</string>
- <string name="about_license">License</string>
- <string name="about_notice">Notice</string>
+ <string name="about_license">Show License</string>
+ <string name="about_notice">Show Notice</string>
<string name="browser_app_name">LibreOffice Browser</string>
<string name="menu_search">Search</string>
More information about the Libreoffice-commits
mailing list