Commit Graph

126 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
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
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
16be82790a android: position in RecyclerView must not be treated as fixed
Change-Id: Id7f88b2b1b9913a006b0b73ceb4421b47fccc495
2017-08-28 19:13:17 +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
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
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
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
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
b59bda7cd6 android: position in RecyclerView must not be treated as fixed
Change-Id: I162428edb00550d496a5cf580d00189d17ea2587
2017-04-05 16:20:06 +02:00
0b727cb61d android: prevent NullPointerException in RecyclerView
Change-Id: I31ffaf62ce470630556db3cf3f4d7a643ad39f5a
2017-04-05 16:20:06 +02:00
d8c23a7276 android: restore tabbed toolbar removed by accident
commit 1503769fe15c122ff2bb8f6f7e7b4ab72656ddc2 removed tabbed
toolbar by mistake

Change-Id: I72e408d8e67b846e227d4563a8cd8455c1e73c29
2017-03-30 22:21:38 +02:00
72b9fe1d47 Add superscript and subscript text formatting options
This commit adds superscript and subscript text formatting
options in formatting toolbar

Change-Id: Id6966eb11b71b269431a21f46bd7c597fdcdb08c
Reviewed-on: https://gerrit.libreoffice.org/35778
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-03-30 20:16:06 +00:00
1503769fe1 tdf#106325 - No way to create a new Document
This commit will add the ability to create a new document.
A FAB is used in home screen which on expansion gives
four options namely new writer document, new impress,
new Sheet or new Draw. Two new events loadNewDocument
and saveDocumentAs have been added.
Another major change includes the use of constraint layout
in LOUIActivity layout as it decreases nesting of views and
improves the app performance. This was needed because
of the new FAB layouts being added.
Support for vector drawables has been enabled.

Change-Id: Ia3ea17f73c0d8514f8ddb7b9a1cbd2ce7de6ac08
Reviewed-on: https://gerrit.libreoffice.org/35183
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-03-30 19:59:10 +00:00
5ad636acc6 Fix typos
Change-Id: Idbf0aa261b829e83d4c08a2e989a4ced871dc6de
Reviewed-on: https://gerrit.libreoffice.org/35616
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-26 20:37:59 +00:00
382f9f7446 tdf#106317 bottom tabbar, grow/shrink font, insert line,rect
- added some initial implementation of the bottom tab-bar, which
  has 3 tabs - character, paragraph, insert

- insert has not (completely) working insert line and rect shapes

- add ability to shring/grow font as alternative to select its size

Change-Id: If039f985403a8155d1e011953043f2979b4bfa91
2017-03-19 23:21:28 +01:00
088fb93a7b tdf#106369 added toggle status ability for the list buttons
Change-Id: Ic3132441bac57abf36e3588e6871c5b14a47c25d
Reviewed-on: https://gerrit.libreoffice.org/35427
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-03-19 21:45:20 +00:00
7e24cedb9e fix typo/grammar: "the the" --> the
* also removing pointless ASCII art (tdf#62475)
* truncate ending whitespace in Doxyfile

Change-Id: I59b012f41ac0d170216229da85a49aa41689dee5
Reviewed-on: https://gerrit.libreoffice.org/35151
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-19 05:43:51 +00:00
b0005f4319 Made toolbar title use the name of the current dir
It uses the name of the current directory, and if the directory is the
root directory, it uses the app name instead.

Change-Id: I1d8ac2545acb3e75be5b19fb5c208a8cb242de11
Reviewed-on: https://gerrit.libreoffice.org/35201
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-03-17 08:48:55 +00:00
135a9e6ac9 tdf#106369, New feature, Inserting numbering/bullets format lists
Editing toolbar_bottom to include two more options:
1- Inserting numbering format lists
2- Inserting bullets format lists

Change-Id: I35f9238c45ab253ea75c693f7a76601408e36f9a
Reviewed-on: https://gerrit.libreoffice.org/35106
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-03-16 19:57:40 +00:00
243476399e Made sort menu use radio buttons
This makes it MUCH easier to see what sort option is currently
selected. Removed the mechanism of switching between labels when
the option is toggled, and instead put all the options into a menu.

Change-Id: I44142dc842d983d5438faeb06b67046bad235308
Reviewed-on: https://gerrit.libreoffice.org/34640
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-03-12 22:32:40 +00:00
686651c30a Combine List Item & Grid Item Adapters of File Explorer View
This commit will combine the code of ListItemAdapter &
  GridItemAdapter in LibreOfficeUIActivity to one
  ExplorerItemAdapter which will handle both the view
  types.

Change-Id: I45c1f5124afee82ff0b78f13609acd37be87fde1
Reviewed-on: https://gerrit.libreoffice.org/34680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-03-12 10:20:33 +00:00
5ada20b358 Improve the Document Provider UX
This commit improves the user experience of different
Document Providers in the app.
In case ext sd card is not present, the option is disabled
in Navigation Menu.
If the device does not support USB OTG,
the option is disabled.
LibreOfficeUIActivity registers a broadcast receiver
in onCreate which detects if a USB device is connected
and directs the user to Settings page to configure it.
In case of errors in configuration in any case,
user is directed to Settings activity after appropriate toast.

Change-Id: I680f78a679e2071ce8330c8168d7aa4e95041723
Reviewed-on: https://gerrit.libreoffice.org/34650
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-27 14:08:32 +00:00
e792eb5216 Moved navigation items to XML
I made them add programatically before, because I was unsure
whether the list was dynamic, but when I found out that the five
items on the list are actually static, I realized that it's better
to declare menu items in XML, because of the performance and
readibility.

Change-Id: I044abe356e51b26ac13328fcf451cabc9e70a3ea
Reviewed-on: https://gerrit.libreoffice.org/34342
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-25 09:29:11 +00:00
ba0f920cc1 Fixed the runtime crash of app by catching exception
Steps to reproduce crash: Click on remote server option in navigation menu, in case of invalid server URL it will show a toast. Then click on Storage Provider Settings once and press back, app will crash throwing runtime exception.
The exception is not catched anywhere so Java runtime exits the app

Change-Id: I2bccca633e62fec82c868661f14765596c4b83f1
Reviewed-on: https://gerrit.libreoffice.org/34166
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-16 14:35:06 +00:00
e86c4d3998 Moved file filtering to a menu option
Moved file filtering from a toolbar spinner to a menu option.
The toolbar title is now free to display some other information.
The options are grouped, so they display radio buttons, and show
which item is selected. The radio group default selection is the
one defined in the settings.

Change-Id: Ib8d8716ec0038d2cd273423c756563680b84ae55
Reviewed-on: https://gerrit.libreoffice.org/34019
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-14 20:55:33 +00:00
417bc89880 Fix typos
Change-Id: Iaf6bbe81f519d49b82f624282d786c8cc18d641c
Reviewed-on: https://gerrit.libreoffice.org/34199
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-13 09:37:18 +00:00
b46ed21a33 Moved "storage provider settings" to nav drawer
Moved "storage provider settings" to the navigation drawer, because
it makes more sense to put it below the storage options, than in a
overflow menu. Also, switched positions of "Settings" and "About",
because About is always the last item, by convention.

Change-Id: If6d621abfee7a3bdda28311a9cadf35ea674f852
Reviewed-on: https://gerrit.libreoffice.org/34073
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-11 00:06:59 +00:00