Commit graph

424 commits

Author SHA1 Message Date
YuviPanda
57888260ec Volley images
Add support for using Volley to load remote images instead of UIL

1. Gives us Caching
2. Load images at full resolution, rather than hardcode them. This is done by trying to fetch an image at highest width possible for the particular view. If it 500s, we assume that the image is smaller than the requested width and just request the full size image
3. Created a MediaWikiImageView, to which you can pass a Media object and it will display it. Takes care of sizing, etc. Optionally you can also specify a view to use as the 'loading' view.

TODO:
Loading from content:// URIs still use UIL. Need to write a Volley HTTP Stack that can fake responses for content:// URIs.

GitHub: https://github.com/wikimedia/apps-android-commons/pull/1
Change-Id: Ia21a7b19fefa552d5a0b013085d0f5f1f80dc5ff
2013-06-12 20:44:57 +00:00
Brion Vibber
e24ce770f1 Fix localizable formatted strings in About screen, part 1.
We can't use formatted strings directly because it breaks with
our localization tools. Grab an HTML string and turn it into
a formatted string.

Localized versions will have to be updated still, but that should
happen automatically at TWN.
2013-05-26 12:52:13 +02:00
Brion Vibber
830545af9b Merge pull request #31 from brion/upload-fail-fix
Fix for crash report if network down when upload starts
2013-05-24 03:12:41 -07:00
Brion Vibber
c1191acd88 Fix for crash report if network down when upload starts
Let the existing error handling detect the IOExceptions from
the filename uniqueness check... this lets us fail gracefully.
2013-05-24 12:11:07 +02:00
Brion Vibber
c7f8186eda Fix for actionbar 'up' fix when rotating
We seem to lose the mediaDetails fragment when we change state. Noooooo!
2013-05-24 11:57:04 +02:00
Brion Vibber
520eb5474c s/getSherlockActivity/getActivity/ in recent code
Where we don't specifically need action-bar or fragment-related stuff,
it's cleaner to use regular getActivity(). If/when the action bar shows
up in the general support libraries that'll be easier to update.
2013-05-21 08:37:52 -07:00
Brion Vibber
f72b3e044b Log in on "Done" or enter press in password field 2013-05-20 14:06:44 -07:00
Brion Vibber
7ab03c5aed Use .jpg instead of .jpeg 2013-05-20 10:48:18 -07:00
Brion Vibber
5b761ea132 Open license page in browser when tapping on license line 2013-05-17 13:39:43 -07:00
Brion Vibber
5be2d939ea "Download" menu button on image detail page.
Saves original file into the SD card "Downloads" directory via
Android's DownloadManager service.

On Gingerbread the notification vanishes after downloda, but we
force the gallery to reindex the downloads area so you can still
manually bump over to Gallery.

On ICS/JB the notification hangs around and can be used to open
the saved file directly.

Note that on Gingerbread we have to download over HTTP because
DownloadManager didn't support HTTPS.

Included copy of stock 'upload' icon, flipped it for 'download'.
2013-05-16 13:13:34 -07:00
Brion Vibber
de34019e60 Name uniqueness checking
Follows sequence 'Foo.jpeg', 'Foo 2.jpeg', 'Foo 3.jpeg' etc until one is
found that doesn't exist, then we send up the upload. This avoids most
typical conflicts scenarios.

Still can produce a conflict if you start uploads near-simultaneously,
but this is better than none.
2013-05-14 16:21:28 -07:00
Brion Vibber
4af8e15fb7 Fix regression in file extension
We were appending a file extension and then throwing it away since some refactoring. Oops!
2013-05-14 16:21:27 -07:00
Brion Vibber
0bdef367b9 Make delete button work 2013-05-10 15:43:15 -07:00
Brion Vibber
43a6551d6e Update menu after rotation on detail view
Fixes losing the 'failed' vs 'ok' upload state in the menus on rotation
in Android 2.3.
2013-05-10 13:21:14 -07:00
Brion Vibber
cf86dc918c Click on failed item now shows detail view
Can restart from there. Abort button is not yet fully functional.
2013-05-09 17:50:20 -07:00
Brion Vibber
143fc308e9 wip 2013-05-09 16:07:37 -07:00
Brion Vibber
d7ea80437a Add menu items for 'retry' and 'abort' on detail view 2013-05-09 15:18:18 -07:00
Brion Vibber
f141e137a3 Merge pull request #14 from brion/blank2
Show 'waiting' or 'no uploads' messages when no uploads
2013-05-06 11:56:12 -07:00
Brion Vibber
04a1555082 Work in progress: waiting for first sync msg 2013-04-29 14:15:11 -07:00
Brion Vibber
e5f38ab6d2 Disable fade-in effect on images in Android 2.3
This should fix the flickering problem during updates, though it
won't look quite as nice when scrolling the contribs list.
2013-04-29 08:00:27 -07:00
YuviPanda
0e1297fe45 Fix crash when trying to edit individual file name in multiple upload
Don't try to disable menu items when they don't exist
2013-04-26 23:48:44 +05:30
YuviPanda
1be36cb16c Change Crash feedback email address to mobile-feedback-l 2013-04-26 23:22:37 +05:30
YuviPanda
ce1934dade Disable menu items for share and open browser when upload incomplete
Bug: 45943
2013-04-26 18:57:49 +05:30
Brion Vibber
c37b18509d Fix flash of descriptive text before recent cats shown
Switch from hiding the "skip" text after looking up cats,
to hiding it initially and showing it after doing the local
search for recent cats.
2013-04-25 15:45:01 -07:00
Brion Vibber
e0e7f056d2 Merge pull request #9 from brion/recentcats
Store and show recently-used categories list
2013-04-25 10:28:34 -07:00
Brion Vibber
f9ca376bf3 Fix regression in first-categorization experience
The skip message now shows when there are no recently-used categories.
2013-04-25 09:07:52 -07:00
Brion Vibber
4922e615fd Compile fix for method that returns Void. :P 2013-04-25 08:57:08 -07:00
Brion Vibber
ae01386018 Remove generic update from categories provider 2013-04-25 08:57:04 -07:00
Brion Vibber
290ac00767 Fixups per Yuvi's notes 2013-04-25 08:14:13 -07:00
Brion Vibber
8b351d94a3 Hide the "skip" message if we load up some recent cats 2013-04-24 13:50:35 -07:00
Brion Vibber
6e8e804861 Use same limit for recent cats and cat search 2013-04-24 13:27:13 -07:00
Brion Vibber
84c2054fb0 Limit view of recent cats to 20 2013-04-24 08:55:24 -07:00
Brion Vibber
308b28dd23 Use query conditions for the name lookup :D 2013-04-24 08:01:17 -07:00
Brion Vibber
29ebce5ab0 Show used cats in MRU order 2013-04-24 07:57:10 -07:00
YuviPanda
f721b163d1 Prevent upload status from overlapping with the title of upload
Bug: 47458
2013-04-24 01:24:14 +05:30
Brion Vibber
d974630704 Use a single content provider client for all cat queries 2013-04-23 12:40:23 -07:00
Brion Vibber
25191a968f Categories now save :D
Still to do:
* limit number of entries
* order by last-used
* show entries on the initial screen before searching
2013-04-23 12:21:54 -07:00
Mark Holmquist
6dae336522 Make template removal work properly 2013-04-24 00:46:02 +05:30
YuviPanda
f941989c19 Revert "Make TemplateRemoveer *actually* remove templates"
This reverts commit e0c23a6038.

mark found a way that was not as agricultural
2013-04-24 00:45:23 +05:30
Brion Vibber
79f6185f8c Add DB updaters for Category table 2013-04-23 10:27:46 -07:00
Brion Vibber
8b7095042d Work in progress: hook up content provider for recent cats 2013-04-23 08:31:01 -07:00
YuviPanda
e0c23a6038 Make TemplateRemoveer *actually* remove templates
Strangely, the \}\} regex seems to match the | character. Weird,
confusing and scary. This *might* be an ICU Regex vs Java native
Regex thing, or it might be something more subtle / obvious that
I am missing.

However since we're simply doing character matches, doing a simple
equals should suffice for this.

Goddamn wikitext.

Bug: 47380
2013-04-23 20:38:36 +05:30
Brion Vibber
8d67c5c2d5 Initial stab at pulling cats from content provider
We don't put anything in the provider yet though. :)
2013-04-23 07:31:46 -07:00
Brion Vibber
d894268056 Drop Parcelable interface, not needed 2013-04-23 07:00:17 -07:00
Brion Vibber
fd1de3cdd8 Stub adapter for the recent cats view... 2013-04-22 16:51:29 -07:00
Brion Vibber
0e23531f59 Tweak column order...? 2013-04-22 16:29:28 -07:00
Brion Vibber
58e48399d5 Work in progress: Category class and content provider
for recently-used categories list
2013-04-22 16:14:28 -07:00
YuviPanda
f9961381ce Trigger Modifications Sync right after all uploads are done
Bug: 46935
2013-04-11 00:21:50 +05:30
YuviPanda
91e0f8cff2 Make template remover more robust
marktraceur pointed out that my previous code will fail at
{{echo|{}} which is, unsurprisingly, valid wikitext
2013-04-11 00:19:09 +05:30
YuviPanda
125275548f Remove results of {{subst:unc}} when adding categories
Also contains a braindead Template remover. Doesn't even handle
identified edge cases, much less unidentified ones.
2013-04-10 19:11:28 +05:30