4247 Commits

Author SHA1 Message Date
mvp76
03a8151875 Added OverscrollLinearLayoutManager to fix scrolling in AppDetails2 2017-03-23 09:29:50 +01:00
Peter Serwylo
343e91280a Merge branch 'new-ui--main-screens--v3' into 'master'
Updates tab + misc UI improvements.

Closes #840, #876, #838, and #892

See merge request !444
2017-03-22 00:20:44 +00:00
Peter Serwylo
c59899cbff Ensure support lib 25.2.0
The default behaviour of gradle when encountering a transitive
dependency which is the same as an explicit dependency, but where the
transitive dependency has a higher version, is to bump the depdendency
which was explicitly added. This meant that the addition of the
bottom navigation library implicitly bumped our support lib to 25.3.0
due to its dependence on it.

The options are:
 * Change the 3rd party lib to support 25.2.0 instead of 25.3.0.
 * Explicitly exclude the transitive support lib dependency in our build
   script (what we have done in the past, e.g. with acra).
 * Bump our explicit dependency.

Given the nature of the changes from 25.2.0 and 25.3.0, it seemed like
it was simplest to bump our dep. However, there is a bug
https://code.google.com/p/android/issues/detail?id=251302 which causes
a function we depend on in SwitchCompat to require API 14. Therefore,
this change excludes the 25.3.0 transitive dependencies, allowing our
25.2.0 dep to get used.

In the process, I've noted that there were a few places we opted for
excluding the transitive dependency in the past. These have now been
removed because we have a higher version than they do, and thus they
will no longer drag our old version forward.
2017-03-22 09:47:12 +11:00
Peter Serwylo
c24ccae02c Use 3rd party bottom nav library which isn't based on support lib one.
The previous dependency extended the support library bottom nav. It did
this at the expense of lots of reflection. This is pretty brittle and
likely to break in future releases as the support lib gets updated. In
the mean time we need to have a fully working bottom nav, so this commit
includes a different dependency.

Most 3rd party bottom navigation panes look great. All that I found
require at least API 11, mostly API 14 (due to animations I suspect).
I've forked one of the most popular ones on GitHub and made it support
back down to API 10. My fork is added as a dependency until upstream
accepts the PR.

If they don't ever, then we can reconsider what our options are.

The two times I've swapped the bottom nav implementation have both been
trivial. The code generally only touches the MainActivity and its
layout.
2017-03-22 08:55:27 +11:00
Peter Serwylo
df25606a29 Correct button padding for category header 2017-03-22 08:55:27 +11:00
Peter Serwylo
d4dc0a1f90 Show the number of apps to update in the bottom nav.
Shows a red badge over the "Updates" menu item.

The updates badge is a bit hacky. There are indeed libraries which
implement a bottom nav which have support for badges built into
them. However they target API 14. There are also other badge
libraries which just deal with rendering, but for the cost of
another dependency, it is not particularly difficult to create a
`TextView` with a background and position it ourselves.
2017-03-22 08:55:27 +11:00
Peter Serwylo
d9cb2fc5da Show text on each bottom nav item, and tone down animations.
Fixes issue #892.
2017-03-22 08:55:27 +11:00
Peter Serwylo
d527b26814 Specify the last time an app was updated when showing update button 2017-03-22 08:55:27 +11:00
Peter Serwylo
60a2ebe9fa Make back behaviour work better for manage repos/installed apps/search. 2017-03-22 08:55:27 +11:00
Peter Serwylo
43a9a9d229 Add dependency to make bottom nav work better + bump support libs.
Right now, it will allow us to set the selected item more nicely.
In the near future, we will use this dependency to control the visual
display of the bottom nav better (e.g. icons/text appearance/animation).

Note that there is a bit of development going on at the Android team,
and the official bottom navigation view may oneday support all of these
features. In that case, we should probably switch back.
2017-03-22 08:55:27 +11:00
Peter Serwylo
385a16448c Stop listening for broadcasts when view not shown. 2017-03-22 08:55:27 +11:00
Peter Serwylo
7b77919432 Correctly navigate to the Updates view from notification. 2017-03-22 08:55:27 +11:00
Peter Serwylo
77f3a5feff Tweaks to UI of updates tab.
* Show selectable background behind "Show/Hide apps" button.
 * Scroll to the relevant place in the list when showing/hiding apps.
 * Only show one line (ellipsized) of the apps to update in header.
2017-03-22 08:55:27 +11:00
Peter Serwylo
0826533d40 Describe the status of an update, rather than showing the app summary. 2017-03-22 08:55:26 +11:00
Peter Serwylo
c275fae9b7 Switch to rounded buttons. 2017-03-22 08:55:26 +11:00
Peter Serwylo
df5db32451 Check downloaded apks on F-Droid first start.
This will read downloaded .apk files from the disk cache in the background.
For each apk that corresponds to an app which can be updated, the status
manager is notified.
2017-03-22 08:55:26 +11:00
Peter Serwylo
4f73b10230 Prefer start/end over left/right
Even though it doesn't matter here because it is going from one side of
the parent all the way to the other. I hope it makes it easier if we
completely avoid right/left and only ever use start/end. Then searching
for RTL problems will be easier.
2017-03-22 08:55:26 +11:00
Peter Serwylo
ce2ac71206 Add support for linear progress bar to installed app layout. 2017-03-22 08:55:26 +11:00
Peter Serwylo
40cc328e98 Updates: Implemented new UI for "Updates" screen.
Alows for more flexibility in what we are able to display, including:
 * Prompting users to donate to frequently updated apps
 * Showing messages from package maintainers to users
 * Marking apps for later installation when offline

Most of these are not yet implemented, but will be able to when
required, whereas they were not able to in the previous UI.
2017-03-22 08:55:26 +11:00
Peter Serwylo
7659c3a33f Renaming 'My Apps' to 'Updates'.
This doesn't change the `MyAppsAdapter` and friends, because they will
be gutted in a subsequent commit.
2017-03-22 08:55:26 +11:00
Peter Serwylo
d4716e6387 Added comments to further explain broadcasts. 2017-03-22 08:55:26 +11:00
Peter Serwylo
23d40dbca0 Added dependency to make working with complex RecyclerViews more manageable.
There were a few different options around, but some of the best ones
which provided the most flexibility when adding diverse/complex
viewTypes to a recycler view target a minsdk above 10.

The "adapterdelegates" library still offers a big improvement on vanila
adapters, especially for the Updates view.
2017-03-22 08:55:26 +11:00
Peter Serwylo
9e2f7edff4 Updated icons in bottom nav to newest versions.
Fixes issue #838.
2017-03-22 08:55:26 +11:00
Peter Serwylo
c1cf153852 Merge branch 'new-ui--categories-imagery' into 'master'
Categories artwork

Closes #851

See merge request !448
2017-03-21 21:53:49 +00:00
Peter Serwylo
f93a1ba6e4 Correctly select categories for app based on highest priority metadata. 2017-03-22 08:00:20 +11:00
Peter Serwylo
bded83d8a3 Added test to ensure repo priority plays nice with categories
This is in response to identifying a bug with the way priorities work
with categories. Two repos may both specify different categories for
the same package. In this case, F-Droid should only select the
categories from the highest priority repo. Well, it is not to say that
this is the most preferable option, but it is consistent with other ways
that repo priorities are used.
2017-03-22 08:00:20 +11:00
Peter Serwylo
bc1ff7d8c8 Show abstract art behind categories without predefined images.
In the process refactored the FeatureImage class to not be dependant on
an instance of Palette for its colours.
2017-03-22 08:00:20 +11:00
Peter Serwylo
1776b1e2c3 Make 'view all' category button have ripple background. 2017-03-22 08:00:20 +11:00
Peter Serwylo
e4766645eb Improve image loading performance by using UniversalImageLoader to background the task
Doing this required tweaking our `IconDownloader` which we give to the
UIL init method in FDroidApp. It only knew how to load from HTTP, but we
needed it to fetch `drawable://` images too (which the library
supports). In addition, it has been renamed `ImageDownloader` as it also
is now used for screenshots/feature images.
2017-03-22 08:00:20 +11:00
Peter Serwylo
7796a3f374 Category images and colours added.
Note that the category images are not scaled for each drawable
directory (would like to move to vectors).
2017-03-22 07:51:07 +11:00
Peter Serwylo
ff946f6a7d Translate category names. 2017-03-22 07:51:07 +11:00
Mikael
a7828bcb9e Merge branch 'new-ui--app-deatils-scroll' into 'master'
Scroll app details appropriately when expanding sections.

Closes #875

See merge request !445
2017-03-21 14:11:34 +00:00
Hans-Christoph Steiner
61e219a02e Merge branch 'placeholder_images_for_screenshots_897' into 'master'
Placeholder images for screenshots 897

See merge request !450
2017-03-20 18:29:02 +00:00
mvp76
34efdf1822 Use the screenshot placeholder image from assets 2017-03-20 12:10:51 +01:00
mvp76
3f04606fcc Extend IconDownloader to handle asset:// protocol
This is currently needed for screenshot placeholders, but might be
useful in the future as well. Note that the default BaseImageDownloaded
supports this, as well as content:// and drawable:// protocols.
2017-03-20 12:10:13 +01:00
Peter Serwylo
b01a871d9d Move app details view up when expanding links/permissions 2017-03-20 19:48:25 +11:00
Peter Serwylo
c65029ae8d Extract functionality to show correct expand/collapse icon
This was not updating the versions expand icon correctly when the user
clicked on it. It was working when they scrolled away and returned to
the versions list. Now it works for both.
2017-03-20 19:48:25 +11:00
Peter Serwylo
b72c418f11 Scroll appropriately when expanding versions 2017-03-20 19:48:25 +11:00
Peter Serwylo
dcf41bcdf2 Merge branch 'gitlab-ci-update' into 'master'
Gitlab ci update

See merge request !449
2017-03-20 07:05:13 +00:00
Hans-Christoph Steiner
655030d1b6 gitlab-ci: require connected24 check now that its fixed
* new docker image: ci-images/client
* switched back to ARM emulator, now that gitlab doesn't allow KVM
2017-03-17 14:02:38 +01:00
Hans-Christoph Steiner
e69c04458f gitlab-ci: build before starting emulator to speed things up
The emulator will grab a bunch of RAM, so run assemble before
connectedCheck so that the app is mostly built before starting the
emulator.
2017-03-17 12:42:59 +01:00
Hans-Christoph Steiner
2c7489508f gitlab-ci: ensure compile platform is installed
Avoid broken builds when fdroidclient gets out of sync with
ci-images/client.

`emulator -no-skin` no longer does anything, but give a warning.
2017-03-17 12:29:45 +01:00
Hans-Christoph Steiner
09ab4b0051 Merge branch 'ci-arm' into 'master'
gitlab-ci: Use ARM emulator for API 24 as well

See merge request !447
2017-03-16 12:03:31 +00:00
Chirayu Desai
0c4059d053 gitlab-ci: Use ARM emulator for API 24 as well
* x86 emulator requires kvm which isn't always available on the
  GitLab CI runners.
2017-03-16 16:35:19 +05:30
Peter Serwylo
c6f7eefddd Merge branch 'new-ui--main-screens--v2' into 'master'
Improved UI for new main screens

Closes #734, #867, and #882

See merge request !434
2017-03-13 23:55:23 +00:00
Peter Serwylo
e8b24bc994 Bumped robolectric target to the same as our compile target
When we first bumped to v24, robolectric didn't support it. Now it does.
2017-03-14 09:49:55 +11:00
Peter Serwylo
ce946f4257 Bump robolectric version
There were troubles with the particular version of gradle plugin and
gradle that we were using, which has since been fixed by robolectric.
2017-03-14 09:49:55 +11:00
Peter Serwylo
259dd38ae9 Extracted triedEmptyUpdate preference. 2017-03-14 09:49:52 +11:00
mvp76
a3de43ff7a Adjust width of toolbar 2017-03-13 11:10:29 +01:00
mvp76
84f844109a Fix typo 2017-03-13 09:25:02 +01:00