It doesn't include all of the Android style checks as found in Android Studio,
but it's a start.
Bump Gradle to 2.7 because the checkstyle plugin in earlier versions is just
not good enough.
As the comment says, this should not be on until it can be opted out from. The
biggest problem is unwanted repo updates, e.g. when a user is on a mobile
connection.
Fixes#435.
The idea was good, but it applied the second-precise date format everywhere.
This broke dates on apps and apks, which have the format yyyy-MM-dd on the
index.
Fix this by having two sets of funcs in Utils, one for dates (precise to a
day) and one for times (precise to a second). We should use the latter for
dates we ourselves measure, like the last repo update time.
It is used as part of swap, but the library never caused any proguard issues
and there is no reason to think it should. The issues came from zipsigner and
its use of spongycastle.
These keeps are to keep swap working, which depends on libraries that use
reflection and other stuff that proguard breaks. libsuperuser is not used by
swap though, and doesn't have those issues.
Add night theme
[Screenshot](http://i.imgur.com/gVK5M0G.png)
The screenshot is huge, so making it an image in markdown takes up a lot of space. Hence link.
See merge request !149
Similar to the dark theme, but dropping blue in favour of very dark shades of
grey.
Removed colorEdgeEffect to simplify the sharing of the style between dark and
night themes. It should default to colorPrimary anyway, so we're good.
Fixes#345.
Refresh layout of AppDetails screen
This change primarily affects the AppDetails links section to make them easier to click. It also strips down the UI a bit to provide a cleaner interface as well as some modest Material Design tweaks.
Fixes#389.
Also fixes an unreported issue where the permissions list would be blank if the app only requested the root permission on devices which no longer support this.
The most significant change is arguably removing the expand/collapse functionality around the links and permissions UI elements. I think personally this kind of UI behavior is a bit of an anti-pattern as it clutters up the UI visually and doesn't provide much if any real utility to the user. Also, given the background and context of the app, I would argue that the links (especially to the source code and website) should have high visual priority as well as the permissions the application requests. I know I personally very commonly click on these before deciding to install any given app.
It's not perfect, and I would like to do more eventually, but I tried to refrain from making too many or too drastic of changes to the existing design for now.
| **before** | **after** |
| -------- | -------- |
| ![before] | ![after] |
**link touch target**
![touch_target]
[before]: https://gitlab.com/zaventh/fdroidclient/uploads/c45d27a19777ea345820d8753d3e290b/before_480.png
[after]: https://gitlab.com/zaventh/fdroidclient/uploads/b1f517c9de9e74c63b6957fed68b3dd3/after_480.png
[touch_target]: https://gitlab.com/zaventh/fdroidclient/uploads/6e7a38610bc792f11a76fe837fb9f28a/touch_target.png
See merge request !153
This change primarily affects the AppDetails links section to make them easier to click. It also strips down the UI a bit to provide a cleaner interface as well as some modest Material Design tweaks.
Fixes#389.
The android build process doesn't waste time running optipng and such, since
it takes minutes to run properly.
I had already ran this a few months ago. Running it again gives an apk ~15KB
smaller, which is welcome. This is because of the new images added.
Translators:
Ajeje Brazorf Sardinian
Allan Nordhøy Norwegian Bokmål
AtomiKe French
Enol Puente Asturian
jaksi Hungarian
Luis Ruiz Spanish
Marc Ringel German
Mário Castanheira Portuguese (Portugal)
Marvin W German
naofum Japanese
Olexandr Nesterenko Ukrainian
Osoitz Basque
Reg Swedish
Thomas Lü German
Ddownload index, even when not presented with a Content-Length header (Fixes 430)
This works for the index download, but still does not work for downloading .apks correctly. That is, the Android Download Manager needs one of:
* `Content-Length: ...`
* `Connection: close`
* `Transfer-Encoding: Chunked`
headers to be set to work correctly. In the absence of all three of these, problems ensue. In fact in my toy web server, even the `Connection: close` did not seem to work correctly, but I'd be happy to be corrected on that. Either way, this is an improvement on what was there before.
For reference, here is my toy PHP web server, which can be saved in the root of the F-Droid repo and invoked with:
> `php -S 10.0.0.4:8888 no-headers.php`
```
<?php
function streamFile( $file ) { $size = filesize( $file );
$contents = file_get_contents( $file );
$buffer = (int)( $size / 5 );
$bytes = 0;
while ( $bytes < $size ) {
$toStream = min( $size - $bytes, $buffer );
echo substr( $contents, $bytes, $toStream );
$bytes += $toStream;
// Sleep to allow progress to be viewed in F-Droid
sleep( 1 );
}
}
$index = "/fdroid/repo/index.jar";
$firefox = "/fdroid/repo/fennec-40.0.multi.android-arm.apk";
// Test downloading a large .apk to see how it behaves
if ( $_SERVER['REQUEST_URI'] == "/fdroid/repo/fennec-40.0.multi.android-arm.apk" ) {
$file = $firefox;
} else {
$file = $index;
}
// Android Download Manager requires this (if not using Content-Length or Transfer-Encoding
// headers, but I can't seem to get it to work as expected).
header( "Connection: Close" );
streamFile( dirname( __FILE__ ) . $file );
```
See merge request !150
Return to SearchResults on "Up" navigation from AppDetails
When arriving to the AppDetails screen from SearchResults, the Up navigation should return to SearchResults screen and not its actual parent.
Not only is this behavior intuitive, it is a commonly accepted UX paradigm on the platform.
See merge request !147
Instead, keep downloading until the `InputStream` returns -1.
Also, required updates to the UI so that when the download size is
not known, there is still a reasonable response to the user.
Note that this still fails when using the Android download manager
if the download attempts to get resumed, and the server did not
send a Connection: close, Content-Length, or Transfer-Encoding: Chunked
header.