[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - 2 commits - android/experimental Makefile.in
Makefile.in|1 + android/experimental/LOAndroid3/AndroidManifest.xml.in |3 +++ 2 files changed, 4 insertions(+) New commits: commit 737cd06a4ba94be234df08c3019abc8412475d78 Author: Jan Holesovsky ke...@collabora.com Date: Fri Oct 10 08:21:25 2014 +0200 android: Disable LibreOfficeUIActivity for now. We should provide just one activity in the .apk; the browser should probably show up when LibreOffice Viewer is started with no file to open... Change-Id: I624afa00f7e8ddc649a272c1b08899e8aac887c9 diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in index cfd369a..989a43c 100644 --- a/android/experimental/LOAndroid3/AndroidManifest.xml.in +++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in @@ -71,6 +71,8 @@ /intent-filter /activity !-- Document Browser Activity -- +!-- Disable it here so that we don't present two icons. + TODO Probably merge the two activities, so that the browser opens when LibreOffice is started with no document. activity android:name=.ui.LibreOfficeUIActivity android:label=@string/browser_app_name android:theme=@android:style/Theme.Holo @@ -79,6 +81,7 @@ category android:name=android.intent.category.LAUNCHER / /intent-filter /activity +-- /application /manifest commit 8ae3ae0ba735b6610ed7b7b3b2b49eb0af7bfaa5 Author: Jan Holesovsky ke...@collabora.com Date: Fri Oct 10 08:20:58 2014 +0200 android: Re-autogen when AndroidManifest.xml.in changes. Change-Id: I53cf6bf10f25702d9ae42afb6846411a3e31c187 diff --git a/Makefile.in b/Makefile.in index 9f5dd1a..302e782 100644 --- a/Makefile.in +++ b/Makefile.in @@ -42,6 +42,7 @@ $(BUILDDIR)/config_host.mk : $(wildcard \ $(SRCDIR)/instsetoo_native/util/openoffice.lst.in \ $(SRCDIR)/configure.ac \ $(SRCDIR)/config_host/*.h.in \ + $(SRCDIR)/android/experimental/LOAndroid3/AndroidManifest.xml.in \ $(BUILDDIR)/autogen.input \ $(BUILDDIR)/autogen.lastrun \ ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - 2 commits - android/experimental
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 3724d3aedcd507f32514a759fa1457b8e001fc9f Author: Jan Holesovsky ke...@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 89c8deab3d2e4f95c5731dfd80dbd2de0096a6b8 Author: Jan Holesovsky ke...@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_descriptionLibreOffice Viewer is a document viewer based on LibreOffice./string string name=app_creditshttp://www.libreoffice.org/string -string name=about_licenseLicense/string -string name=about_noticeNotice/string +string name=about_licenseShow License/string +string name=about_noticeShow Notice/string string name=browser_app_nameLibreOffice Browser/string string name=menu_searchSearch/string ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - 2 commits - android/experimental
android/experimental/LOAndroid3/res/layout/document_viewer.xml | 34 android/experimental/LOAndroid3/res/layout/file_explorer_grid_item.xml | 10 android/experimental/LOAndroid3/res/layout/file_grid.xml | 22 android/experimental/LOAndroid3/res/layout/file_list.xml | 10 android/experimental/LOAndroid3/res/layout/file_list_item.xml | 58 android/experimental/LOAndroid3/res/layout/main.xml |2 android/experimental/LOAndroid3/res/layout/navigation_grid_item.xml | 20 android/experimental/LOAndroid3/res/values/arrays.xml |6 android/experimental/LOAndroid3/res/xml/libreoffice_preferences.xml | 24 android/experimental/LOAndroid3/src/java/org/libreoffice/android/DocumentLoader.java | 186 +- android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java | 121 - android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java | 177 + android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 893 -- android/experimental/LOAndroid3/src/java/org/libreoffice/ui/ListItemAdapter.java | 274 +-- android/experimental/LOAndroid3/src/java/org/libreoffice/ui/PageView.java | 86 android/experimental/LOAndroid3/src/java/org/libreoffice/ui/PreferenceEditor.java | 20 android/experimental/LOAndroid3/src/java/org/libreoffice/ui/WriterViewerActivity.java | 55 17 files changed, 1007 insertions(+), 991 deletions(-) New commits: commit 492cfffd5490272d993753af1d6e7240743c9a3a Author: Jan Holesovsky ke...@collabora.com Date: Fri Oct 10 07:34:44 2014 +0200 More tabs - spaces. Change-Id: I9a3e104b05479413dc314f299824a48ead004693 diff --git a/android/experimental/LOAndroid3/res/layout/document_viewer.xml b/android/experimental/LOAndroid3/res/layout/document_viewer.xml index 62f5556..b4f4501 100644 --- a/android/experimental/LOAndroid3/res/layout/document_viewer.xml +++ b/android/experimental/LOAndroid3/res/layout/document_viewer.xml @@ -7,27 +7,27 @@ -- RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=wrap_content -android:layout_height=match_parent +android:layout_height=match_parent android:id=@+id/document_viewer_root -ViewFlipper +ViewFlipper android:id=@+id/page_flipper android:layout_width=match_parent - android:layout_height=match_parent - +android:layout_height=match_parent + /ViewFlipper -HorizontalScrollView +HorizontalScrollView android:layout_width=match_parent android:layout_height=wrap_content - android:layout_alignBottom=@id/page_flipper - android:scrollbarAlwaysDrawHorizontalTrack=true - android:background=#aa00 - LinearLayout - android:id=@+id/navigator - android:layout_width=wrap_content - android:layout_height=120dp - android:layout_margin=15dp - android:orientation=horizontal - /LinearLayout - /HorizontalScrollView +android:layout_alignBottom=@id/page_flipper +android:scrollbarAlwaysDrawHorizontalTrack=true +android:background=#aa00 +LinearLayout +android:id=@+id/navigator +android:layout_width=wrap_content +android:layout_height=120dp +android:layout_margin=15dp +android:orientation=horizontal +/LinearLayout +/HorizontalScrollView -/RelativeLayout \ No newline at end of file +/RelativeLayout diff --git a/android/experimental/LOAndroid3/res/layout/file_explorer_grid_item.xml b/android/experimental/LOAndroid3/res/layout/file_explorer_grid_item.xml index 585a805..e4569e0 100644 --- a/android/experimental/LOAndroid3/res/layout/file_explorer_grid_item.xml +++ b/android/experimental/LOAndroid3/res/layout/file_explorer_grid_item.xml @@ -10,15 +10,15 @@ android:layout_height=match_parent android:paddingTop=10dp android:orientation=vertical - - ImageView + +ImageView android:id=@+id/grid_item_image android:layout_width=100dp android:layout_height=142dp android:scaleType=fitStart android:layout_gravity=center /ImageView - + TextView android:id=@+id/grid_item_label android:layout_width=wrap_content @@ -28,9 +28,9 @@ android:paddingRight=10dp android:paddingTop=10dp android:layout_gravity=center -android:textSize=15dp +android:textSize=15dp android:textStyle=bold android:maxLines=2 /TextView
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - 2 commits - android/experimental
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java |5 android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java |5 ++-- android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java |7 + android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java | 12 +- 4 files changed, 11 insertions(+), 18 deletions(-) New commits: commit 65bf7c7e0bdeb6c59edd081695ea4092a81d24b9 Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Wed Oct 1 17:46:03 2014 +0200 android: fix redrawing everyting on part change (via sidebar) Change-Id: If7aeeca3da65f44dfe1f9a5bc347baf4e3cadd82 diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java index 54478bf..31b9eb5 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java @@ -46,10 +46,11 @@ public class LOKitThread extends Thread { mApplication.getLayerController().getView().changeCheckerboardBitmap(bitmap, mTileProvider.getPageWidth(), mTileProvider.getPageHeight()); } -mLayerClient.clearAllTiles(); - +mLayerClient.clearAndResetlayers(); +draw(); RectF rect = new RectF(0, 0, mTileProvider.getPageWidth(), mTileProvider.getPageHeight()); mController.setPageRect(rect, rect); +mController.setViewportMetrics(mController.getViewportMetrics()); mController.setForceRedraw(); } diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java index c6c7d7938..1ad8d38 100644 --- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java +++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java @@ -195,7 +195,7 @@ public class DynamicTileLayer extends Layer { } } -public void clearAllTiles() { +public void clearAndReset() { tiles.clear(); currentViewport = new RectF(); } diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java index 5905d4a..23095ef 100644 --- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java +++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java @@ -264,8 +264,8 @@ public class GeckoLayerClient implements LayerView.Listener { mRootLayer.reevaluateTiles(mLayerController.getViewportMetrics()); } -public void clearAllTiles() { -mRootLayer.clearAllTiles(); +public void clearAndResetlayers() { +mRootLayer.clearAndReset(); } private class AdjustRunnable implements Runnable { commit ecd6cc3014d9039f48b2bbd7bfcea3e6d433c15c Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Wed Oct 1 17:41:02 2014 +0200 android: null safeguards and cleanup unneeded calls Change-Id: I0ffcfb0fbaa03e5035bec9dd1ffed21f85972470 diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java index 859a3d8..332e0f8 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitShell.java @@ -3,7 +3,6 @@ package org.libreoffice; import android.os.Handler; import android.util.DisplayMetrics; -import android.util.Log; public class LOKitShell { @@ -20,10 +19,6 @@ public class LOKitShell { } } -public static void viewSizeChanged() { -Log.i(LOGTAG, viewSizeChanged); -} - // Get a Handler for the main java thread public static Handler getMainHandler() { return LibreOfficeMainActivity.mAppContext.mMainHandler; diff --git a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java index 03da4bf..c6c7d7938 100644 --- a/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java +++ b/android/experimental/LOAndroid3/src/java/org/mozilla/gecko/gfx/DynamicTileLayer.java @@ -131,6 +131,10 @@ public class DynamicTileLayer extends Layer { } public void reevaluateTiles(ImmutableViewportMetrics viewportMetrics) { +if (tileProvider == null) { +return; +} + RectF newCurrentViewPort = inflate(roundToTileSize(viewportMetrics.getViewport(), tileSize), tileSize); if
[Libreoffice-commits] core.git: Branch 'feature/droid_calcimpress3' - 2 commits - android/experimental
android/experimental/LOAndroid3/res/layout/about.xml | 13 +- android/experimental/LOAndroid3/res/values/strings.xml | 10 --- android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java | 10 +-- 3 files changed, 20 insertions(+), 13 deletions(-) New commits: commit 13ecf84e85d7511dce76238b4fcc1f1dc0b5c29b Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Wed Oct 1 19:56:01 2014 +0200 android: about dialog description, app names - viewer browser Change-Id: I4f759b6a004ca8f12974f3d0daa9f1d78c015f2a diff --git a/android/experimental/LOAndroid3/res/layout/about.xml b/android/experimental/LOAndroid3/res/layout/about.xml index f1222dc..ec014a0 100644 --- a/android/experimental/LOAndroid3/res/layout/about.xml +++ b/android/experimental/LOAndroid3/res/layout/about.xml @@ -12,17 +12,18 @@ android:layout_height=wrap_content android:text=@string/app_description android:textColor=@android:color/secondary_text_light -android:textSize=16sp/ +android:textSize=18sp/ TextView android:id=@+id/about_credits android:layout_width=match_parent android:layout_height=wrap_content android:autoLink=web +android:paddingBottom=20dip android:paddingTop=20dip android:text=@string/app_credits android:textColor=@android:color/secondary_text_light -android:textSize=16dip/ +android:textSize=18dip/ LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent @@ -33,15 +34,15 @@ android:id=@+id/about_license_button android:layout_width=wrap_content android:layout_height=wrap_content -android:text=License -/ +android:layout_marginRight=12dp +android:text=License/ Button android:id=@+id/about_notice_button android:layout_width=wrap_content android:layout_height=wrap_content -android:text=Notice -/ +android:layout_marginRight=12dp +android:text=Notice/ /LinearLayout /LinearLayout \ No newline at end of file diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml index 74dee00..d04f92e 100644 --- a/android/experimental/LOAndroid3/res/values/strings.xml +++ b/android/experimental/LOAndroid3/res/values/strings.xml @@ -1,11 +1,13 @@ ?xml version=1.0 encoding=utf-8? resources -string name=app_nameLibreOffice/string -string name=app_descriptionDescription/string -string name=app_creditsCredits/string +string name=app_nameLibreOffice Viewer/string -string name=browser_app_nameLibreOfficeUI/string +string name=app_about_namebLibreOffice Viewer \'Beta\'/b/string +string name=app_descriptionLibreOffice Viewer is an document viewer based on LibreOffice/string +string name=app_creditshttp://www.libreoffice.com/string + +string name=browser_app_nameLibreOffice Browser/string string name=menu_searchSearch/string string name=list_viewList/string string name=grid_viewGrid/string commit c733d163136de22c73a9c25bdb05a90a342f7bd4 Author: Tomaž Vajngerl tomaz.vajng...@collabora.com Date: Wed Oct 1 19:54:08 2014 +0200 android: clicking Parts in preferences opens the side drawer Change-Id: I3cfd0a31409f6a798c933dae4a47b75e93601f6b diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java index a37438e..1fce7d4 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -63,9 +63,13 @@ public class LibreOfficeMainActivity extends Activity { @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); -if (id == R.id.action_about) { -showAbout(); -return true; +switch (id) { +case R.id.action_about: +showAbout(); +return true; +case R.id.action_parts: +mDrawerLayout.openDrawer(mDrawerList); +return true; } return super.onOptionsItemSelected(item); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits