Commit Graph

186 Commits

Author SHA1 Message Date
506f7a5e2b unused import
Change-Id: I45ba3c258594e8f3b50ffdc07ca1e09dc5691c3d
2017-09-24 13:58:17 +02:00
d67358d05c lint: remove redundant type casts (findViewById to object of type)
Change-Id: I0ec35ea5817d110ca20942ce9d95e0120848580a
2017-09-24 13:58:16 +02:00
e731867f05 use gradle to build the owncloud-android-lib
this will allow using current android SDK tools & emulator

Change-Id: Ic7f9996a36e4af2a5cad07e28c8830b8df12aa44
2017-09-24 13:58:16 +02:00
41a43ac737 buildscripts section actually needs dedicated repositories
Change-Id: I50f080d085dcd303b2cc54f503793f080ea4f50c
2017-09-23 21:42:40 +02:00
09d954447f android: bump support library & buildtools/SDK versions
also add google maven repo, since

"The support libraries are now available through Google's Maven
repository. We no longer support downloading the libraries through the
SDK Manager, and that functionality will be removed soon.."
https://developer.android.com/topic/libraries/support-library/setup.html

Change-Id: Ica0a2542903f60c7bffa1daa2409b60422bde88f
2017-09-22 21:40:48 +02:00
f000bb2a23 blank doesn't take any effect anymore. remove it from android's fonts.conf
Change-Id: I387ceac08ec5f78686cacd90f897c7c12758ae5d
2017-09-21 13:14:55 +02:00
dc93e5cc7c android: textrelocations are no longer an issue (can target 23 and later)
Change-Id: Ib80651bf3b23cf74abc76472c247b83622046700
2017-09-15 18:14:08 +02:00
3de5cd341d android: tune symbols for lldb & we actually target 14 as minSDK
-glldb might be placebo switch like -ggdb2, but at last it won't hurt
:-)
increase java heap size for gradle to allow inprocess dex as well as
actually processing the huge files.
furthermore fix platform level in configure to match the minSDK value
from build.gradle

Change-Id: I57d7d4c67bc3e5ed8bfed1e592b85211b5b8905a
Reviewed-on: https://gerrit.libreoffice.org/42162
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-09-12 12:04:09 +02:00
7b946b386d tdf#90556 android: make buildID in about a clickable link to git log
that will allow them to deduce the age of the build

Change-Id: Ic1baffbf1ecc6a743a1edd91d24c86670dc640a3
Reviewed-on: https://gerrit.libreoffice.org/41962
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-09-07 22:04:14 +02:00
2e8e0b213a android: drop workarounds for ndk-gdb support (can still run manually)
packing gdbserver into apk conflicts with extractNativeLibs="false", as
the gradle pugin compresses it (which could be disabled using
aaptOptions), but furthermore it doesn't page-align it, breaking
installation.
So instead let the user manually push the gdbserver tool to device and
remove the hardcoded values that were only there to please the ndk-gdb
scripts.
Using lldb from within Android Studio is more comfortable anyway :-)

Change-Id: I31c3af4847a479c56b3fcd6b5bed114e004bf0d2
Reviewed-on: https://gerrit.libreoffice.org/41950
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-09-07 22:03:10 +02:00
1470aaec9e tdf#112190 installLocation should be specified in toplevel manifest
Thanks to Petr Vorel for catching this.
Fixes portion of 66518ead516e90d606e87c6ce58ec11fea6d172e that added
back the android:installLocation placeholder

Change-Id: Ibd3333dfafb65fabcb5df3f7a6626a00f5d71bc9
2017-09-04 14:26:56 +02:00
723487f415 android: prevent null pointer exception on start
Change-Id: Ifb59ba0cd634d9753f90716bda2af4f58d576afa
Reviewed-on: https://gerrit.libreoffice.org/41173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-09-03 21:05:55 +02:00
66518ead51 use extractNativeLibs="false" for less disk usage and faster installation
no need to extract the (huge) nativve lib to the device's filesystem on
newer android versions (Marshmallow and later) - can access the .so from
within the apk if it is uncompressed.
While the standalone apk will be larger, the delta-update mechanism of
playstore can be more efficient, so you get:
* faster installation (since the file doesn't need to be extracted)
* less disk usage on device (for same reason)
* smaller delta-updates for playstore

drawbacks
* larger standalone apk
* on older android version more storage needed (the increased size of
the standalone apk), as those will still extract the native-lib

Unfortunately uncompressed it exceeds the current maximum size for
single apk files in playstore (100MB), so cannot use for release-builds

also revive installLocation attribute to allow installation on external
storage and move from manifestPlaceholders from defaultConfig to release
buildType (as otherwise gradle complains about having "Multiple entries
with same key")

Change-Id: Id07ac9c144886bb89abaf7b5b4bc7bd548f27247
2017-08-31 12:49:13 +02:00
e19100212c android: use sp (instead of dp) for font-size
Change-Id: I11dbf24b38c08b4dfd3cc64dbacbcd949a37b833
2017-08-31 12:49:12 +02:00
6f29e5cb30 min and target SdkVersions are taken from gradle
Change-Id: I2eeb265b101b126f6bf268c9c5fa0195a44b0ce7
2017-08-31 12:49:12 +02:00
750105742e android:singleLine is deprecated, use maxLines=1 instead
Change-Id: I32c7d000848f10a40a2b7b0038463c31ddade6f8
2017-08-28 19:20:56 +02:00
16be82790a android: position in RecyclerView must not be treated as fixed
Change-Id: Id7f88b2b1b9913a006b0b73ceb4421b47fccc495
2017-08-28 19:13:17 +02:00
1a7857211c need to use app:srcCompat when using VectorDrawableCompat
instead of plain android:src

Change-Id: I202f5564ad4bb94a4d7bcf788a7173a9c217990d
2017-08-28 18:55:58 +02:00
218ea87508 [Android] Clean up util func with Calc dev
Removed redundant util functions addProperty
and twipToPixel in several Calc related classes.

Change-Id: I169be2edf74e662d5c3e3fcbd80265e9a694598d
Reviewed-on: https://gerrit.libreoffice.org/41372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-08-27 20:37:26 +02:00
43f5161991 [Android Viewer] Password support
Added password support for documents.

Change-Id: Ifd9cf86894ddaf2fd5ad97510d2ac1b5850611ad
Reviewed-on: https://gerrit.libreoffice.org/40458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-08-27 20:12:52 +02:00
985474a03f [Android Viewer] Fix windowSoftInputMode
Fix the wrong parameter in AndroidManifest.
When changing android:windowSoftInputMode,
one should not specify multiple "adjust..." or "state...".

Change-Id: I0dcacd846d4fe5c2976fe1708b29086b98f2607b
Reviewed-on: https://gerrit.libreoffice.org/40686
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-08-16 16:30:06 +02:00
a149042c12 Ability to change Font Color and added a new Color Picker on Android Viewer
Change-Id: I1d22749a446e451196f0819322cb04ed7d7befae
Reviewed-on: https://gerrit.libreoffice.org/37840
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-08-16 16:28:17 +02:00
f45cdbc9f3 [Android Viewer] Add header funcs to Calc
Added insert/delete/hide/show/optimal width or height
/adjust width or heigth  to Calc. These options
show in a floating menu near the headers when the
user taps on the headers. Also added selection on
headers, i.e., user can drag on headers to select
multiple columns/rows.

Change-Id: I7e1994d1fa81d80c110def035c2c065e838b49ac
Reviewed-on: https://gerrit.libreoffice.org/40684
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-08-07 14:41:02 +02:00
b947151152 [Android Viewer] Add cell selection by row/column/all
Added cell selection to Calc docs in Android Viewer with a
similar behavior to LOOL wrt. row/column selection.
The user can tap on any header to select whole row/column
or select all by tapping the top left corner of the header.

Change-Id: I34bdbb1aacc5fc0ed9175908936a8a5e6eec4ff4
Reviewed-on: https://gerrit.libreoffice.org/39694
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-31 23:15:48 +02:00
2cba4ea967 [Android Viewer] Fix crash after save dialog
Fixed the crash after save dialog caused by
a possible null pointer related to presentation
mode.

Change-Id: I2fcf254f4382eaa5b565e25679486a5158d56eac
Reviewed-on: https://gerrit.libreoffice.org/39847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-23 23:11:32 +02:00
cb79eba9be [Android Viewer] Correct typo of class name
Corrected the accidentally named inner class in
PresentationActivity.java from camel case to
Upper case.

Change-Id: I0c27efe371611959e40cd656628a0fa2c9c0cdce
Reviewed-on: https://gerrit.libreoffice.org/39832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-23 23:11:10 +02:00
02f3c4848a Calc UI on Android Viewer
Adding Calc UI. Two blank views are added as
row and column headers. CommonCanvasElement
is used to draw header cells on the views. [WIP]

Change-Id: I37eaa82805045ab650fd127e54c8421c61a4ea27
Reviewed-on: https://gerrit.libreoffice.org/38936
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-23 23:00:48 +02:00
6b87343904 Presentation Mode
Adding fullscreen presentation mode.

Change-Id: Id07416ce204d1d7dd917fbd33a4d9f5072ac1703
Reviewed-on: https://gerrit.libreoffice.org/38006
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-07-11 10:52:19 +02:00
ab27953d9e android: show when native-code.py is invoked even for non-verbose builds
Change-Id: I176d140bf5efc090c89cbd3a3699a764abf7107a
Reviewed-on: https://gerrit.libreoffice.org/39121
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-06-23 10:21:03 +02:00
eeb65fabd4 Listen for changes in editing preference settings
This commit gives the ability to listen for changes in
editing preference settings to LibreOfficeMainActivity.
This makes sure that value of mIsExperimentalMode
boolean is correct in any condition.

Change-Id: Ie2a931e63fad30262ad2f870b6c06f707db96618
Reviewed-on: https://gerrit.libreoffice.org/37033
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-06-21 16:26:48 +02:00
bffb5437b4 enable the Action/Toolbar for Settings screens
by using a theme that has it enabled

Change-Id: Icf3b66d38de55e2b08d4e4ced463bab045e56c43
2017-05-30 18:33:13 +02:00
cb57abf33f android: bump build-tools, support-lib and gradle-plugin versions
Change-Id: Ib9fa2a3ca0ad4ba5075c9c25e5b2cba1e0e7285a
2017-05-30 18:33:13 +02:00
eac12b1fe5 android: simplify some more if statements
Change-Id: I49f7069ca774468b4b9d44541238e38edd0f5bd7
2017-05-28 14:26:50 +02:00
f45cfc6569 Update zoom constraints with device rotate
Added function of updating zoom constraints
whenever device rotates. This is achieved by
calculating min zoom factor every time the
size change function is called.

Change-Id: I6d795c1eb79faa36b4f5dabedd2d4b8c87dcf7d7
Reviewed-on: https://gerrit.libreoffice.org/37847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-05-27 09:48:47 +02:00
e0ccc89135 Fix behavior of double tap zoom in and out
Fix the behavior of double tap zoom. Previously
double tap zooms to the viewport whose
top left point is the point of double touch. Now
double tap behaves such that the point of
doule touch does not move on the screen, and
the rest part of the view zooms in or out. This
behavior is more UX friendly and correct.

Change-Id: Ifccc337631d523be1cd870f892235899d0fc5dfe
Reviewed-on: https://gerrit.libreoffice.org/37046
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-05-09 19:51:49 +02:00
5c2833c4ed tdf#107415 android: appbar invisible on lower version
Rearranged activity_main.xml in order to fix the bug
of app bar invisible on lower versions of Android
devices.

Change-Id: Ic4ec9435ce9ef55a2596600c143114c899c30ac2
Reviewed-on: https://gerrit.libreoffice.org/36950
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-05-09 19:45:33 +02:00
78098b8494 Add BottomSheetBehavior to formatting toolbar
This commit adds the BottomSheetBehavior to the
formatting toolbar appearing from bottom.
CoordinatorLayout replaces the RelativeLayout in activity_main
and bottom toolbar is made the child of it.
Also, Add 'adjustPan' option to LibreOfficeMainActivity's
windowSoftInputMode flag so as to prevent soft keyboard
from pushing the views up

Change-Id: Ic9999c1177ac238bc7c482a69daec4e629fe6d93
Reviewed-on: https://gerrit.libreoffice.org/35768
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-19 14:45:54 +02:00
936ffc11ce tdf#96770 android: disable 'parts' in text documents
Text documents only have one part, so 'parts' button
in the menu should be disabled.

Change-Id: Id36a57bcf35bc6347136dda82d8da2d7ca308285
Reviewed-on: https://gerrit.libreoffice.org/36538
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-18 14:28:17 +02:00
1a748066b4 tdf#96799 android: does not switch edit mode to view
Added a checking of whether edit mode is on or off
before making a switch between edit and view modes.

Change-Id: I69043bc8694b605a517e16385abfa91d86d34d30
Reviewed-on: https://gerrit.libreoffice.org/36541
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-18 14:27:37 +02:00
50938d84de Double tap zooms in and out
Added double tap action in
JavaPanZoomController. This commit depends
on "restrict zoom to page width".

Change-Id: Ifbe13f698ea01af2223beede9211a13b4970a3d5
Reviewed-on: https://gerrit.libreoffice.org/36164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-18 14:26:26 +02:00
d70636a314 Discard StorageAccessFramework for creating new documents
This commit adds the ability to create a new document using
existing file system browsing in the app.
Usage of StorageAccessFramework to create new document
has been ditched as it is not backward compatible.

Change-Id: I852c3de337613cb01e689d532476d2c5f932c1b3
Reviewed-on: https://gerrit.libreoffice.org/36195
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-18 14:14:14 +02:00
78bc5053a1 tdf#96764 - Android Viewer does not show page count
Added page number display in text documents. The page
nunmber calculation in handled on Java side and the
work only involves calls to LOKit when necessary.
Majority of the work is done in DocumentOverlayView.
java, including calculation and displaying. The page
number information is updated whenever a page number
change callback is caught (from LOkit).

Change-Id: I52014806cd647fa805b329825ac29b0e337c11a1
Reviewed-on: https://gerrit.libreoffice.org/36178
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-18 14:10:33 +02:00
5333f93a6f tdf#96811 Android Viewer doesn't focus on the word you search.
Added the function of focusing on the word you search. Two
methods were added. The first one is searchResultSelection,
which parses a JSONObject passed from LOK and focuses
on the text selection. The second one is
moveViewportToMakeSelectionVisible. It handles well both
documents and spreadsheets. I also tried to add a
search not found toast message. Also corrected a typo.

Change-Id: I4453c01afc520bf4deae4c2bd71adea2fe856d7e
Reviewed-on: https://gerrit.libreoffice.org/35715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-18 13:31:38 +02:00
ed900113d0 tdf#106368 android: restrict zoom to page width
Created an overloaded constructor for ZoomConstraints class that
takes in minZoom and maxZoom. Added calculation of minZoom
according to page width and screen width and assigned the
minZoom to ZoomConstraints in LOKitThread class. Deleted
minZoom checking in the onScale method in JavaPanZoomController
class because the checking prevented zoom-in from functioning.
(Update: I also removed the old constructor because it is not
used any more.)

Change-Id: I89e80761efc093b3738970d4482dd735532c0397
Reviewed-on: https://gerrit.libreoffice.org/35308
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-18 13:02:34 +02:00
74859b3a68 Fix typos to complete commit b35552f39503
Change-Id: I2a10f9989e682dfc88f3b1d5864bfce1637933ab
Reviewed-on: https://gerrit.libreoffice.org/36359
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-04-10 12:40:47 +02:00
b35552f395 Fix typo: 'forgeround' in multiple files
Fixed typo: forgeround --> foreground
in 19 files.

Change-Id: Idb4c9ccd98a949a2574cdbd5b44f91509b9856a9
Reviewed-on: https://gerrit.libreoffice.org/36154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Gautam Prajapati <gautamprajapati06@gmail.com>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-04-10 10:08:05 +02:00
c78de00189 android: simplify some if statements, remove redundant variables
Change-Id: I55a866ac66ffeab5fe2ebb45d86f68558b468650
2017-04-05 21:09:59 +02:00
e9b7dd6faf android: getDrawable(int) is deprecated
additionally reduce scope of to package-private

Change-Id: I46ca55c5ef7daf992407beef53f5da939bf9066a
2017-04-05 18:52:10 +02:00
2e8868493e android: otg_missing_error is not a format string
Change-Id: I8d06218b595f619c12d0402f8d8319a35a37daa1
2017-04-05 16:46:31 +02:00
ef3191e733 android: using VectorCompat requires to use app:srcCompat
Change-Id: Ifd66e104519ace4d1d27f1312b66d873476ed2c3
2017-04-05 16:20:06 +02:00