14 Commits

Author SHA1 Message Date
Nico Alt
a653b0156a improve AppDetails
- App icon is now 72dp x 72dp
- Description is expandable
- License, categories, Website, Source Code, Issues and Donate (#232) are moved from header to summary
- Buttons to install, update and run are moved from action bar to header
- Permissions are expandable and always shown
- Add myself to copyright holders of "F-Droid/res/layout/app_details_header.xml", "F-Droid/res/layout/app_details_summary.xml" and
"F-Droid/src/org/fdroid/fdroid/AppDetails.java"
2015-06-10 15:48:11 +02:00
Peter Serwylo
52c4554877 Removed localrepo classes that were used before "swap".
All of the relevant code from them has been ported across to swap,
and they are no longer needed as a reference for how to implement
app swapping.
2015-05-14 22:24:40 +10:00
Peter Serwylo
93339cbbfb Fix issue 246: Rewrite process for verifying existing repos.
Previously it would only compare the details of a new repo to existing
ones if the new repo came via an intent. Now it does it whenever you
change the text in the new repo dialog (shouldn't be too much of a
performance hit, it isn't doing very much).

The things it (still) doesn't do is:
 * verify that the url looks like a url
 * sanitize the newly input uri and compare it to sanitized saved repos

The second point means that you can end up with:
 http://10.0.1.50/ and
 http://10.0.1.50

both in the list. I'm going to log an issue for this, because it should
be fixed, but doesn't need to hold this up.
2015-05-10 21:56:40 +10:00
Hans-Christoph Steiner
571e4a18e4 move all text bits to strings.xml so they are translatable
Inline text is not translatable, it is important to heed the lint warnings
about:

Hardcoded string "Swap success!", should use @string resource
2015-04-14 18:08:03 -04:00
Daniel Martí
e3175530ed Apply a bunch of Android Studio fixes 2015-04-07 11:43:07 +02:00
Daniel Martí
81c44ef4ae Merge branch 'fix168' into 'master'
Fix #168: Not enough space for version number and license

downgrade weight from 2 to 1 and from 1 to 0

See merge request !62
2015-04-05 16:57:11 +00:00
Nico Alt
b017f35010 fix #127: Add text wrapping in application view 2015-04-04 22:30:18 +02:00
Nico Alt
d6cac24fed fix #168: Not enough space for version number and license
downgrade weight from 2 to 1 and from 1 to 0
2015-04-04 22:11:10 +02:00
Peter Serwylo
23ed692436 "Select apps for swap" screen work on API <= 10.
* Provide CheckBox for selected items

Newer API's highlight the background using the "activated" state. Older
APIs need this to be implemented differently, so there are now checkboxes
on the left of the list view items to provide this functionality.

 * Clean up IDE warnings

Diamond operator for generics, remove unused imports and unused method.

 * Adapter class created for installed apps

Cleaned up the code to do with binding views to the adapter in this view.
Previously it made quite a few assumptions about the structure of the layout,
e.g. "layout.getParent().getParent() is a LinearLayout", which would cause
crashes if the layout changed slightly.
2015-04-01 15:27:24 +11:00
Peter Serwylo
4711b50836 Swap works on 2.3 devices.
* Cleaned up text alignment styles for API < 17.

API v17 has a textAlignment style, wherease previous verisons rely on
the "gravity" property. This change includes gravity="center" where there
was previously only textAlignment="center".

 * Fragments get added properly on 2.3 device.

For some reason, when adding the fragment to android.R.id.content, it
wouldn't work on my 2.3 device. This change includes a (almost) empty
activity layout with a single FrameLayout. The fragments are added to
this rather than "content", and it works better. It is not perfect - it
still adds the fargments behind the action bar, and so the action bar
appears blue. But at least they are there :)

 * Added translatable strings where constants were used before.

Not related to v2.3 support, but stil important for a stable release,
that is fully translated.
2015-04-01 15:26:10 +11:00
Peter Serwylo
3abb426fc3 Added a message when any of the app lists are empty.
Previously, a few people have been confused by an empty list when they first
open F-Droid (e.g. if they are not connected to the internet, and repos didn't
update). This provides some feedback so that there is never a blank screen.

Fixes Issue #34.
2015-03-16 21:42:10 +11:00
Peter Serwylo
74b285a77f Fix Issue #5: Guess at common repo paths (/, /fdroid/repo, /repo)
When adding repositories using the Manage Repos activity, firstly look
for an /index.jar appended on the URL provided by the user. If that
doesn't work (HTTP status code other than 200) then it will try
/fdroid/repo/index.jar, then /repo/index.jar. If it can't establish a
connection to the server, or if none of the above attempts results
in a 200, then the path provided by the user is kept (even though we
have a hunch it might be wrong).

This is to cover for the case where people arn't connected to the net.
Another way to deal with no internet connectivity is provided by a
"Skip" button on the dialog while searching for the index.jar.

The searching for index.jar is done by doing a HTTP HEAD request, so
the entire jar needn't be downloaded.

Finally, to make this happen in a clean sort of way, I refactored the
ManageReposActivity a little bit to encapsulate all of the add repo
dialog handling into a subclass. This way, the outer class doesn't
need to know things like: Is the dialog showing, what state is it in,
is the background task to search for index.jar files running, how and
when to cancel that task, etc.
2015-03-14 00:44:17 +11:00
Daniel Martí
5af7cac4b7 Remove all trailing whitespaces in source files 2014-12-30 23:48:36 +01:00
Daniel Martí
06dd4c8dcb Move F-Droid project into subdir, keeping a root gradle project
Also improved .gitignore a tad
2014-12-09 15:36:07 +01:00