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>
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>
- 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
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>
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>
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>
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>
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>
Changed text alignment in file browser to not center horizontally,
because it should be glanceable and therefore should be left-aligned
(ideally the start-aligned).
See https://material.io/guidelines/components/lists.html .
Change-Id: I383141bc2f49b63927c136d911f50cfd15bdef45
Reviewed-on: https://gerrit.libreoffice.org/34290
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
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>
Changed to make more sense to non-tech-savvy users.
See https://material.io/guidelines/style/writing.html for
writing guidelines.
Changed grid default value from string to integer, since the value
is effectively an integer, and no point in being a string.
Change-Id: I6c1737927e7f9d20536756c3cb8b7059cf49500b
Reviewed-on: https://gerrit.libreoffice.org/34074
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
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>
Explorer file view option in Settings is working now.
To listen to the preference updates in the app
a custom class SettingsListernerModel has been added.
SettingsListenerModel.java file contains the methods
to instantiate and set OnSettingPreferenceChangedListener
in the implementing class.
LibreOfficeUIActivity implements this listener
and it is triggered by onSharedPreferenceChanged() method
in SettingsActivity.
This class can also be used to listen to other preference changes
in Settings.
Change-Id: I063024df01cf183d2a6211648e32805795af20a9
Reviewed-on: https://gerrit.libreoffice.org/34012
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
This is one in a series of commits of trying to unclutter the context
menu, which was pretty unorganized.
Change-Id: I8a9473041730492a0b60c6b71fd7fd7996cedd89
Reviewed-on: https://gerrit.libreoffice.org/33768
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
The recents mechanism works like this:
Every time the file is opened, it saves that file to the shared
preferences set, by putting it in the first place, and removing the
oldest file from the list, if there are more than 4 recent files.
It also adds dynamic App Shortcuts if the device is 7.0 and above.
Screenshot: http://imgur.com/a/7kWOl
Edited the layout to add a new RecyclerView for recent items, as
well as the headers for both the recycler view's. Recent files
appear only if in home directory, below app bar and above the
file browser. This could be subjected to change in the future.
Screenshot of the recents section: http://imgur.com/a/qrqZq
Change-Id: I5c99aa26351d9ad2313e18b5b696d04a782e6155
Reviewed-on: https://gerrit.libreoffice.org/33759
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Replaced empty spinner with the document title in the Main (viewer)
activity. Had to edit the themes to not disable title, and edit the
manifest to make the desired activities use that theme. If the theme
is set in the "application" tag, it will apply the theme globablly.
Also cleaned up and tightened the ToolbarController.
Change-Id: I5099860787b5f84d01c98c5e53ade519c2f89cc4
Reviewed-on: https://gerrit.libreoffice.org/33306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
It was coded pretty badly, so I cleaned it up. Most notably, it used
a static instance of the Activity, which is a huge no-no which
creates memory leaks. The irony is, it already had a reference to the
Activity used correctly in the constructor. One memory-leak fixed,
29 more to go (LibreOfficeMainActivity holds that static Activity
object which needs fixing). Also, simplified the "bottom toolbar"
in preparation for the CoordinatorLayout implementation which will
allow the activity to have fancy animations and smart interactions.
Change-Id: I31aa117f6179910db73a5256b0a287357e1dec83
Reviewed-on: https://gerrit.libreoffice.org/33010
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Because RecyclerView is more optimized, especially if there are lot
of items. This way, we don't have to recreate ListView and GridView
each time we switch view modes. Changed list adapter to appropriate
RecyclerView adapter, and created new grid adapter inline, next to
the list adapter, while deleting the older grid adapter file. Since
these adapters are almost identical in content, maybe we could:
a) Make them extend the same "base" adapter, to avoid duplicate code
b) Unite them into one adapter which would display appropriate views
at appropriate times.
Change-Id: I1545c2c245ca642a689dee584bffb15f90aac4a6
Reviewed-on: https://gerrit.libreoffice.org/32976
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
Replaced the custom implementation of the drawer with the support library one.
This one inherently follows Material Design guidelines, and is much easier to
maintain. This implementation also allows for header in the drawer, and so
we could put something useful there to make the drawer even better. Also kept
the original way of programatically adding the menu items, although I find this
practice somewhat unelegant. Maybe we could have static list of items, and then
grey-out the ones that aren't currently available? Also added appropriate icons
to the menu items (which are vector drawables, of course), but I only covered
the providers that appeared on my device (I can't confirm that there are no
other providers), so if the provider is covered, it will have an icon, but if
I didn't cover it, it will appear just fine, but without an icon. Maybe we
could move the settings and sorting to the navigation drawer, also? It would
be cleaner and more elegant, IMO.
Change-Id: I02a051f0b75c6d4e16f518aa19fb9c6eef00f5e4
Reviewed-on: https://gerrit.libreoffice.org/32881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Replaced old and busted icon design, with Google's generic app icon.
It is now a vector drawable, which means it will be sharp at any resolution,
while we only need to keep one tiny xml file for it. No folder thumbnail
support, but this a welcomed change nontheless.
Change-Id: Ie6e38a6ac8e6cf1bc2d22247c11b5de0bd0d8478
Reviewed-on: https://gerrit.libreoffice.org/32498
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
Lowered all-caps navigation labels to something more professional.
Added a Spinner to the Toolbar in XML.
Reworked many lines of LibreOfficeUIActivity to remove possible NPE's, and also
removed redundant lines, which were mostly deprecated, as well as switching to
a newer implementation of a toolbar-spinner navigation pattern. There are more
deprecated methods, but I wanted them in a separate commit.
Change-Id: I15d5365ed7c00880873bf7874bc794008436bb99
Reviewed-on: https://gerrit.libreoffice.org/32497
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
as non-native mipmap resolutions don't get stripped from the apk (as
drawables would), but launchers and similar might still want to show the
higher-res version instead. Google Play store now enforces this.
Also rename to the common name for it ("ic_launcher" instead of "main")
Change-Id: I97318287f05556f5db0afaa0b23c0d8c9628465e
Reviewed-on: https://gerrit.libreoffice.org/31204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
and account for the libreofficekit changes
This reverts commit 50e9065cbbb2c62fa925cf5b561a85c715a0eb1e.
that did in turn revert 4ae8c3c20bd4a10ba141a32f01e23ac63636f9c3.
Change-Id: Ie02d8743b3608120ed63bfe2a014fa4139577b01
the linux build / libreofficekit also uses those and needs to be told
about this change as well.
This reverts commit 4ae8c3c20bd4a10ba141a32f01e23ac63636f9c3.
If we draw a black graphic handle manually, then it's possible to color
it later, this isn't easy if a bitmap is painted.
Change-Id: Ib4456fd5155862d52e3ffa79ee49c7bfd16fb742
Reviewed-on: https://gerrit.libreoffice.org/26860
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Background:
External SD cards are only partially supported by the Android system,
with a great deal of fragmentation on implementation across manufacturers
and android versions. There is no official support for OTG devices.
This commit adds:
1) External SD card support
2) OTG device support
Caveats:
1) Not tested on Android 6. Emulator crashes when opening
files on Android 6, using an unmodified build of the master branch.
2) OTG support currently works only if there is write access
to the OTG directory. The user must be aware of exact OTG directory
path or be able to navigate to it as well.
3) External SD card provider currently lacks file filtering.
Approach:
-----
Added new document providers.
External SD cards:
There are 2 different document providers external sd cards,
one for Android 4.4 and above, and the other for older versions.
1) New
Android 4.4 and above require usage of the DocumentFile wrapper class
to access files in external storage. Actual file paths are no longer
obtainable. As such, the underlying file will be cloned in a cache,
allowing us to get an actual file path and use LOK.
Some differences exist between 4.4 & 5+. The document provider handles
each case separately.
2) Legacy
Android 4.3 and below do not support the DocumentFile wrapper.
File object can be used in these versions, allowing actual file paths
to be obtained. The document provider guesses the root directory of
the SD card. If the guessing fails, the user is to navigate to
this directory himself.
OTG:
The OTG document provider resembles the legacy external SD card
document provider, requiring the user to locate the directory himself.
The document provider does not guess the root directory of the OTG
device as the location varies with manufacturer implementation.
-----
Supplementary Notes:
Attempting to use the internal app cache as the file cache like in
the ownCloud document provider did not work. Using the external app
cache works fine though. It could be because initializing LOK wipes
the internal app cache.
Would be good to test the ownCloud document provider to confirm if it
works.
Change-Id: Ie727cca265107bc49ca7e7b57130470f7fc52e06
Reviewed-on: https://gerrit.libreoffice.org/20738
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Duplicate <include layout="@layout/toolbar"/> statement found.
Problem could be caused by either
1) a differing xml reading mechanism across android versions
2) toolbar being accessed in a different way across android versions
Duplicate element removed, and linearlayout shifted below first toolbar.
Change-Id: I084b6498745bc72988f3a8eed12f7a72d261e267
Reviewed-on: https://gerrit.libreoffice.org/20422
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
LOKit supports searching, but this was not implemented yet in the
Android GUI. This adds a bottom search toolbar where you can type
a search string + up/down search handles to search for the string
from the current cursor position.
Change-Id: Ia7461d2c6399c23201d2ea81f0b44c38533939a1
The bottom formatting toolbar now shows the formatting options
previously located in the main toolbar as a menu entry (bold,
italic, ...). In addition alignment options and selection of fonts
and sizes have been added.
Bottom formatting toolbar is not shown by default - it enables when
hitting the icon in main toolbar. Also soft keyboard and formatting
toolbar should not be shown at the same time.
Change-Id: I5f6cf8a9fcbdb4d154ae7504a65f9a226c99d694
A number of such bitmaps were removed by accident in commit
74463457b39c9def1add630b7b0581dc195549c8 (android: chanhe handles to use
alias, tint handles with color, 2015-11-01).
Change-Id: I253c4b5790e82de32e6fd06896645adf360fa586
When browsing the root directory, the application home button (on the
top left corner) becomes a drawer icon. When not in the root dir, the
icon is an arrow as usual.
This will increase the visibility of the document providers feature.
Also, modified the behavior of the system back key to close the drawer
in case it is open.
Change-Id: Id0ce932907bcec4b8601029482eda0c1c1f0df35
Reviewed-on: https://gerrit.libreoffice.org/16246
Reviewed-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Tested-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Added an additional check so back has to be pressed twice on the root
folder to actually leave the application. It's a check seen in many
other apps.
Change-Id: I26827113a41070aa8188fa616ba8fe53742329b3
Reviewed-on: https://gerrit.libreoffice.org/16245
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>