Commit graph

246 commits

Author SHA1 Message Date
YuviPanda
19f9aed040 Do not leak a TypedArray instance
Change-Id: Ifea85ed88b7054af7b7f8c36ab90cdf9fca36597
GitHub: https://github.com/wikimedia/apps-android-commons/pull/26
2013-07-10 21:59:27 +00:00
YuviPanda
81e79cf096 Make thumbnails load faster by loading smaller Thumbnails
GitHub: https://github.com/wikimedia/apps-android-commons/pull/25
Change-Id: I0af540a1d84348a7a3e67c6037cd509b88b84b21
2013-07-10 20:44:59 +00:00
Brion Vibber
35736733c3 Fix for 'download' on media detail page on Honeycomb
DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED is
documented as appearing in 3.0 (api 11) but causes a crash on
a GoogleTV 2 (Honeycomb-based) device.

Skipping it for Honeycomb as we do for Gingerbread; your media
goes into the 'Downloads' directory and can be found there, but
there's no notification on completion.

GitHub: https://github.com/wikimedia/apps-android-commons/pull/24
Change-Id: I4b5b0c0ffc0d9bfa8d1ff524d531022ba8f3f9f8
2013-07-10 01:07:22 +00:00
Ragesoss
a9a7935828 switch to correct mailTo address for crash reports
The crash reports were pointed at mobile-feedback-l@wikimedia.org,
which does not exist. Change to the correct address,
mobile-feedback-l@lists.wikimedia.org

Change-Id: Ibfe09713c81ce4310e0c63cbc47afdf878e70113
2013-07-03 15:54:26 -04:00
Brion Vibber
6c97d3e01b Bug 48995: Add acceptable use 'tutorial' to app
Initial port of the acceptable use tutorial from iOS app. This version uses static images and is not yet animated. Indicator circles on the pager are done using Apache-licensed https://github.com/JakeWharton/Android-ViewPagerIndicator -- imported via maven. Currently the tutorial launches when we reach the login screen (as when first installing the app or creating a new account from system settings). You can either 'back' out of it or page through and hit the 'yes' button.

GitHub: https://github.com/wikimedia/apps-android-commons/pull/20
Change-Id: Ibc444102e28a55bfa7bbae601ff0c56268a0c7dd
2013-06-24 14:24:38 -07:00
YuviPanda
032d1164a5 Do not dismiss progress dialog when user taps outside in LoginActivity
Change-Id: Ib3954655871532ac01df0cd428ae09e9f0551855
GitHub: https://github.com/wikimedia/apps-android-commons/pull/21
2013-06-20 19:48:59 +00:00
YuviPanda
00c0ccea49 Display summary line for license with current license text
Change-Id: Id7f524f46ef336046978766131b896f3147f0a54
GitHub: https://github.com/wikimedia/apps-android-commons/pull/19
2013-06-18 18:50:28 +00:00
YuviPanda
55525bc100 Allow users to select preferred license for their contributions
Needs some UI love on both selection & intimation, but works otherwise

People can pick from CC BY-SA, CC BY, or CC0. The commons templates
are set using {[self}}, which I think is good enough.

GitHub: https://github.com/wikimedia/apps-android-commons/pull/14
Change-Id: Iffca6f75c63de6fbe61c4dc41b93dd5f692065a5
2013-06-18 08:43:17 -07:00
YuviPanda
86a39e9d13 Better rounding for width, avoids pixelation in large displays
Bug: 49718

Change-Id: I67541852b9bcb20fbb4b0af4b3900f2af4ace7bc
GitHub: https://github.com/wikimedia/apps-android-commons/pull/15
2013-06-18 08:16:43 -07:00
YuviPanda
1f61f310e1 Fix crash on Android 2.3 caused by missing method
Bug: 49716

Change-Id: I34d34fbefc98a943d55dc6beb6c116f0f7f5e29c
GitHub: https://github.com/wikimedia/apps-android-commons/pull/16
2013-06-18 14:38:42 +00:00
YuviPanda
052439a2d5 Merge "Persist width & height to Parcelables" 2013-06-18 01:12:26 +00:00
Brion Vibber
e6ef53429d bug 47671 -- don't show crashy photo button if no camera present
We were crashing when trying to take a photo if no camera was
present on the device, since no activity can be found for the
camera intent and an exception is thrown.

Work around this by simply checking if the device has a camera
via the package manager feature checks, and hiding the menu item
if relevant.

GitHub: https://github.com/wikimedia/apps-android-commons/pull/13
Change-Id: I635946ed32cf768917db4a8dff0058061e45e6ec
2013-06-17 22:21:36 +00:00
YuviPanda
b6d3a3f7c6 Persist width & height to Parcelables
Makes sure value is persisted when passing from an activity to
another

Change-Id: I9ad12bd794cb3bceb7cf94246bc40f4b80d4815b
GitHub: https://github.com/wikimedia/apps-android-commons/pull/12
2013-06-17 21:19:46 +00:00
YuviPanda
b0bc8d0532 Add a progress bar to display upload progress, instead of just text
Change-Id: Id858ce3e508031435f7ceda3b2ffe2372b0c5510
GitHub: https://github.com/wikimedia/apps-android-commons/pull/11
2013-06-17 17:48:50 +00:00
Brion VIBBER
0d70ec6f80 Merge "Maintain max width / height info to speed up image downloading" 2013-06-17 17:41:49 +00:00
YuviPanda
305e076dbf Maintain max width / height info to speed up image downloading
If we ever download an image's original, we'll save its width and
height. This ensures that we don't try to fetch thumbnails that are
larger than the image itself too often, reducing 500s and improving
performance much.

TODO: Save image's width / height during upload process itself

GitHub: https://github.com/wikimedia/apps-android-commons/pull/8
Change-Id: Ice11cfabab96999b0d07b965d4515b47c1fff428
2013-06-17 16:59:31 +00:00
YuviPanda
94ba7d4e69 Merge "Fix download title to make more sense" 2013-06-16 12:41:53 +00:00
YuviPanda
4de5c124e1 Do not crash in details view if we try to view local image
Makes sure that if we don't have an image set, we just do nothing
rather than crash badly

Change-Id: Id1947be4cda1dff1610c69213d7ada986c6a9c67
GitHub: https://github.com/wikimedia/apps-android-commons/pull/9
2013-06-14 14:34:56 +00:00
YuviPanda
12fac7ef35 Fix download title to make more sense
Set title to file name, and description to app name

Change-Id: I68778959cf9b6abd42b223c4866387c4880fd835
GitHub: https://github.com/wikimedia/apps-android-commons/pull/6
2013-06-13 19:58:26 +00:00
YuviPanda
154411b15b Add subtle way to show people where uploads are going to
Says 'testwiki' or 'commonswiki' at the bottom of About

Change-Id: I757bb5820985e950476e1c9b4d274e35dfcc7b96
GitHub: https://github.com/wikimedia/apps-android-commons/pull/5
2013-06-12 23:34:11 +00:00
YuviPanda
941a2ac194 Do not batch responses from image loader threads
Don't wait to batch image loads, just send 'em back as fast as
possible

Change-Id: I4a97d938c38157d4b534580a037fa950c89b1de9
GitHub: https://github.com/wikimedia/apps-android-commons/pull/4
2013-06-12 22:59:55 +00:00
YuviPanda
19b389af96 Clean out some excess logging
Change-Id: I3207086bae63f077c5808fba10e9fec9931ab4f1
GitHub: https://github.com/wikimedia/apps-android-commons/pull/3
2013-06-12 21:40:25 +00:00
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