4267 Commits

Author SHA1 Message Date
Peter Serwylo
61d7ba9f29 Start auto downloads once preference is enabled.
Fixes issue #896.
2017-03-26 10:50:26 +11:00
Peter Serwylo
8ed62d22e1 Correctly listen for "Install complete" for previously downloaded apks.
This ensures that if the user has downloaded an update (manually or via
auto updates), then the UI will respond correctly once it is installed.
2017-03-26 10:50:26 +11:00
Peter Serwylo
b9c429d22d Add "App X successfully installed" to updates tab.
This notification is kind of weird, because the only ways it can be
dismissed is by:
 * Swiping a notification away from the notification drawer.
 * Closing and reopening F-Droid.

However I think the UX is still pretty nice:
 * Tells the user that it worked.
 * Allows them to navigate to it if desired.
2017-03-26 10:50:26 +11:00
Peter Serwylo
b179aaecff Remove final dependency on AppDetails (the old one).
In a future MR I will remove this class completely, but this just
ensures that touching a notification will not send the user to the old
AppDetails (instead sending them to AppDetails2).
2017-03-26 10:50:26 +11:00
Peter Serwylo
bf8a61765d Fix padding on bottom navigation.
Default padding specified is 12dp which is not very generous.
This reduces it to 2dp for seemingly good effect. Yet to see what it
looks like with longer translations of other languages, but time will
tell.
2017-03-26 10:50:25 +11:00
Peter Serwylo
bb7fca7382 Remember search input after hitting "Back" from app details.
Move logic which parses intent and forceably sets the text of our search
input to onCreate(), not onResume(). onCreate() is invoked each time a
new intent is sent to open up this activity. That is, each time a new
category is opened or a new search request is received. onResume() is
called much more often than this, including when the user is directed to
a new activity and then returns to the search screen after hitting back.
In this case we don't want to remove the search query the user had and
replace it with the data in the original intent.
2017-03-26 10:49:56 +11:00
Peter Serwylo
ba503812e4 Don't listen for the same broadcast events twice.
Caused crashes when we incorrectly provided info to the recyler view
about which items had been added/removed.
2017-03-26 10:49:56 +11:00
Peter Serwylo
d4584083af Refactor button styles for clearer distinction between large/small.
Small ones are used in the "Updates" screen, whereas large are used
elsewhere (e.g. in the app details, but also the "Start swap" screen).
2017-03-26 10:49:56 +11:00
Peter Serwylo
15be01ada9 Ignore UI dumps from Android Studio/DDMS.
These are useful for debugging things like padding/margin issues, but
they get dumped to the source dir by default.
2017-03-26 10:49:55 +11:00
Peter Serwylo
b177dc2cda Update "Nearby" splash screen to new UI.
Be sure to not hardcode "F-Droid" to ensure it is easier to rebadge
F-Droid if creating a whitelabel version.

Fixes #894.
2017-03-23 22:19:22 +11:00
Peter Serwylo
53bed0f2e1 Change language to clarify auto download preference
The previous language hinted at the fact we auto download and install
updates like Google Play. This is not the case (unless you have
priv-ext). To clarify, now we "Automatically _fetch_ updates", ready to
install when the user initiates the install.

Fixes #839.
2017-03-23 22:19:22 +11:00
Mikael
836d16393d Merge branch 'app_details_749_more_work' into 'master'
App details 749 more work

See merge request !451
2017-03-23 10:28:48 +00:00
mvp76
a32a534957 Fix test after adapter change 2017-03-23 11:12:59 +01:00
Peter Serwylo
31fdcba945 Remove xmlns from inner element 2017-03-23 09:42:46 +01:00
Peter Serwylo
80e0f84816 Use correct locale when uppercasing text.
Locale.getDefault() returns the default for the current JVM (or whatever
runtime Android calls it these days). By asking the configuration, we
will get the Locale that the user has selected from within the F-Droid
preferences.
2017-03-23 09:42:36 +01:00
mvp76
c059b83f2b Fix merge conflict 2017-03-23 09:37:33 +01:00
mvp76
622a1245dc Move "what's new" from its own section to the header section
Also, add some styling and placeholder text (randomly set or not set)
2017-03-23 09:32:58 +01:00
mvp76
2d27ba4086 Display anti-features
Issue #878.
2017-03-23 09:32:58 +01:00
mvp76
0689a39735 Add last updated under the title and author
Also, added styles for the title and the last updated text.
2017-03-23 09:32:58 +01:00
mvp76
d457a5ca0a Drop the "Summary" from the main header, and instead just go straight to the description 2017-03-23 09:29:50 +01:00
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