summaryrefslogtreecommitdiffstats
path: root/photoviewer/src
Commit message (Collapse)AuthorAgeFilesLines
* Allow PhotoViewActivity to choose inital photo by uriMartin Hibdon2012-10-162-1/+37
| | | | | | | | This ensures that the correct photo will be displayed even if the contents of the cursor changes between the time the activity is launched and the cursor gets loaded. Change-Id: I5f00ebde072587929f01e34c8b4b84e5eb0e9bd3
* Temporary fix for image viewer crashAdam Copp2012-10-051-0/+6
| | | | | | | | This fixes a bug causing the app to crash when we can't open a stream to a url when we download an image. Bug: 7294701 Change-Id: Ifd0c62c3f5bb6a168e2e2932734fa448ffb9344c
* resolved conflicts for merge of b3f0f056 to masterPaul Westbrook2012-09-252-3/+188
|\ | | | | | | Change-Id: I5def1804466ff971ed5bc5afd2a2d68e135d20a2
| * Add Exif parserPaul Westbrook2012-09-252-170/+343
| | | | | | | | | | | | | | | | | | | | | | Class to parse exif headers of images to detect orientation Modify ImageUtils#decodeStream to parse the exif header and respect orientation Bug: 7087307 Change-Id: I93c3a69a50ae26d3fd4e96944439f87e9d511945
* | am 29c041a3: am 88d18b9f: am 4054bd6d: Use gesture detector from support libPaul Westbrook2012-09-212-670/+8
|\| | | | | | | | | * commit '29c041a3e41b93c7ffd8f29550df501f0b45ea02': Use gesture detector from support lib
| * Use gesture detector from support libPaul Westbrook2012-09-212-670/+8
| | | | | | | | | | Bug: 7206080 Change-Id: I9b5d332d095335f13b61c9c9ccd8152a462a9eb5
* | Merge "Add option to permenantly show ProgressBar"Adam Copp2012-09-215-5/+32
|\ \
| * | Add option to permenantly show ProgressBarAdam Copp2012-09-205-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to indicate to the user that more content is loading, the provider can provide an image with the loading field set and null as it's url. In this case, we will not try loading any image, and will just show the ProgressBar. Something like this is nessecary in Velvet, where we wish to load infinite images. Change-Id: Ib26412a579abdbe7fbd338b99ff39f4d1c13f806
* | | am 05783789: am da78c1dc: am c907eecd: Prevent NPE while viewing photo from ↵Mark Wei2012-09-201-2/+4
|\ \ \ | | |/ | |/| | | | | | | | | | | | | attachment. * commit '057837890de13cc9fd6909f4c4a69abec388a34d': Prevent NPE while viewing photo from attachment.
| * | Prevent NPE while viewing photo from attachment.Mark Wei2012-09-191-2/+4
| | | | | | | | | | | | | | | Bug: 7189283 Change-Id: Ibcb98ae13cf801a6934e0ed4efb4c5349678dcce
* | | Merge "Cursor listeners can use setPhotoIndex meaningfully"Adam Copp2012-09-201-3/+3
|\ \ \
| * | | Cursor listeners can use setPhotoIndex meaningfullyAdam Copp2012-09-191-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | Cursor listeners can now use setPhotoIndex and have the changes take effect immediately. It appears that nobody in code search will have their code broken by this change. Change-Id: I76afd8545310c24f05307d38ed03081914a17987
* | | am dd2a57c4: am d9904217: am bd64181d: Integrate copy of GestureDetector ↵Paul Westbrook2012-09-182-8/+657
|\ \ \ | | |/ | |/| | | | | | | | | | | | | into photoviewer * commit 'dd2a57c446c05fe7cd8453bc249f38c03d2ab299': Integrate copy of GestureDetector into photoviewer
| * | Integrate copy of GestureDetector into photoviewerPaul Westbrook2012-09-172-8/+657
| | | | | | | | | | | | | | | | | | | | | This allows the MR0/1 behavior to be used when Email/Gmail is running on older versions of the platform Change-Id: I1936d36ddb9f09a3b48d38c2ad44e70ac002fbda
* | | am 34672da4: am 4030071b: am 697c046e: Prevent NPE in Gmail while viewing ↵Mark Wei2012-09-171-1/+4
|\| | | |/ |/| | | | | | | | | photo from attachment * commit '34672da452ddf07347d2e9fc02f6d66c954ebba3': Prevent NPE in Gmail while viewing photo from attachment
| * Prevent NPE in Gmail while viewing photo from attachmentMark Wei2012-09-171-1/+4
| | | | | | | | | | Bug: 7174197 Change-Id: I29ca226b5134888dbe3488f859d9790fe1388984
* | Do not show loading bar after thumbnail has loadedAdam Copp2012-09-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | After talking to the designers for Google Now, who have said they talked to the designers from gallery app, it appears that we should not show the loading spinner once the thumbnail has loaded. Let me know if this is orthogonal to the behaviour you would like in the gmail app, and I can write a more involved patch with an overridable callback to decide wether to show the spinner or not. Change-Id: I77a3f2e2487d469ab47e45c7a94942f831528d41
* | Merge "Make setLightsOutMode protected"Adam Copp2012-09-061-1/+1
|\ \
| * | Make setLightsOutMode protectedAdam Copp2012-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | setLightsOutMode becomes protected so that subclasses can reliably hide and show ui elements when fullscreen mode is enabled. Change-Id: I891cfd80b515df72020d5df21427247615f04a74
* | | Fix double-tap to restore from fullscreenAdam Copp2012-09-061-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | After auto-hiding the actionbar, two taps must be made to restore the action bar. this change fixes that by calling setFullScreen instead of just changing lights out mode. This correctly updates the mFullScreen variable and means only one tap is required to restore the action bar. Bug: 7117697 Change-Id: I8645ca77c2f025868c487c2c63e7057d696d6dac
* | Scope changes and removal of unnessecary variableAdam Copp2012-09-043-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds isFullScreen() and setPhotoIndex() protected methods to PhotoViewActivity in order to allow subclasses access to this information. Removes mDataValid from BaseCursorPagerAdapter since it was hiding how simple the checks actually were (it was just mCursor != null) A nullcheck has also been added to BaseFragmentPagerAdapter in instantiateItem. in the long term, BaseCursorPagerAdapter should not be so fragile, and should not surface nulls, but that change could be quite involved, so should probably not be rolled into this change. Change-Id: I4889c5ae2a764660926c70da25b85565f4600188
* | Add parameter for max initial scale factorAdam Copp2012-09-045-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | you can now pass EXTRA_MAX_INITIAL_SCALE into PhotoViewActivity in order to specify the maximum initial scale of images displayed. This parameter defaults to 1x if now supplied, so images will not be displayed larger than their actual size by default. This allows the gmail team to resolve 7049410 whilst velvet can keep something like the old behaviour (which is more natural for their app) Bug: 7049410 Change-Id: I7d230666ca50a4634d8436519ed280cc6e558ee3
* | am 7d920938: am 45faaf4d: am 2b4059cd: Allow action bar to be updatedPaul Westbrook2012-08-301-0/+6
|\| | | | | | | | | * commit '7d9209389c0c678cbd5a82d767fb6c984fcd0d64': Allow action bar to be updated
| * Allow action bar to be updatedPaul Westbrook2012-08-301-0/+6
| | | | | | | | | | | | | | | | Allow the action bar to be updated when the photo list loader loads data Bug: 7082929 Change-Id: I476df1fa2ec7dcb1adfe5aed359a5126c60be179
* | resolved conflicts for merge of f688fc95 to masterMark Wei2012-08-302-2/+5
|\| | | | | | | Change-Id: Ib4ade547d76faa4a730b75ea691c1cf1f99888cd
| * Fix NullPointerException when tapping attachment.Mark Wei2012-08-302-2/+4
| | | | | | | | | | Bug: 7083179 Change-Id: I9955aeda9a0d2bb6d30ce9f7e7e3961cb47284e0
* | am 97992e59: am c645df0a: am 4f38cc16: Attachment image viewer should not ↵Mark Wei2012-08-292-3/+10
|\| | | | | | | | | | | | | scale images larger than original size. * commit '97992e595ffb8eef8a6a12609cc4da368d4e0f6f': Attachment image viewer should not scale images larger than original size.
| * Attachment image viewer should not scale images larger than original size.Mark Wei2012-08-292-3/+10
| | | | | | | | | | Bug: 7049410 Change-Id: I1ed2555203e1541f1481cae4f17f532eaa57c1cd
* | am 4689c6f8: am 162052cc: am 114cef99: Fix crash in email with attachmentsPaul Westbrook2012-08-292-41/+38
|\| | | | | | | | | * commit '4689c6f834a99fe8b57f2391bc14d13a3c6645cb': Fix crash in email with attachments
| * Fix crash in email with attachmentsPaul Westbrook2012-08-282-41/+38
| | | | | | | | | | | | | | There isn't a need to call swapCursor in a runnable Bug: 7072747 Change-Id: I0a0a9b6835acc4a1d1748c94f4d8bec4551638b0
* | Merge "Add HTTP uri handling & fetch thumbnail first"Adam Copp2012-08-223-175/+206
|\ \ | |/ |/|
| * Add HTTP uri handling & fetch thumbnail firstAdam Copp2012-08-223-175/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a http:// or https:// url is specified as the thumbnail uri or regular uri for an image, we attempt to fetch it over the internet. Also, changed the order of loading so that we always attempt to fetch the thumbnail image before we fetch the regular image. This aids in the http:// uri case, since it should take significantly less time to be presented with a thumbnail than the full image. Finally, finishes the photo viewer activity when the "top" button on the action bar is pressed, unless a custom override has been added. These 3 changes could be seperated into different patches if you would like Change-Id: Iddc8cc6bef3f9e66198dfb98eb2f7bd309023b3f
* | Abort posted runnable if cursor is no longer openMarc Blank2012-08-211-0/+4
|/ | | | | Bug: 7002552 Change-Id: I38ce1231b0ec88ebf02d4d0edb5495b8baac65d5
* Fix some photo view problemsPaul Westbrook2012-08-154-34/+33
| | | | | | | | Make sure to stop the indeterminate progress bare when we can't load an image Bug: 6956516 Change-Id: Ifb69ca2e08a8ddfb351989d8e276e7fb6e3b06e5
* Created a sample photo viewer implementation.Andrew Sapperstein2012-08-101-3/+3
| | | | Change-Id: Ida5ab5c3247a52c5fbbd495d6e127c18493356ce
* Made title and subtitle not show immediately.Andrew Sapperstein2012-08-073-29/+7
| | | | | | | | Fixes an issue where we used to show the app title for an instant before getting the data for the photo. Now we show nothing until we have the photo data. Change-Id: I2a77b18af2ec2051848c188e0dad7ca04be4f285
* Fix Build.Andrew Sapperstein2012-08-071-2/+0
| | | | Change-Id: If36065612faadc4d6b44ddbfc9efde0597db4718
* Enabled optional support for showing progress.Andrew Sapperstein2012-08-033-40/+142
| | | | | | | | | | | | | | | | Added some progress bars to the "empty" view so that implementors of the API can show the progress of things like downloads or loading. Additionally, added a retry button and an optional text that allows you to indicate status to the user. Due to a bug in the framework, we actually use two progress bars (one determinate and one indeterminate) to update our status. Created a wrapper that allows the controlling of both progress bars in sync. Change-Id: I710e06317948d376d445abf1603545982ac8479d
* ActionBar now auto-hides like Gallery's version.Andrew Sapperstein2012-07-302-21/+56
| | | | | | | | | | | | 5 second delay from opened. Will not hide on first appearance. Has be closed and re-opened. Also, eliminated the progress spinner when the photo hadn't yet loaded. Additionally, modified the action bar to match gallery's transparency. Change-Id: I69e72d787bc2cda9c18df6a9cf1800d155d6876a
* Fixes a bug where scaling would not be performed.Andrew Sapperstein2012-07-271-1/+10
| | | | | | | | | Had to add an additional case to the page transform that handles the new issue where the just disappeared view is actually behind the screen but still getting touch events. Victory. Change-Id: Ifb760fd7d7510fec37c4101d448dbc980575b1be
* Partial fix of 6890014.Andrew Sapperstein2012-07-273-6/+3
| | | | | | | No longer crashing. But the attachment is now in a very weird state. Change-Id: If688d9c19a81124cbd1ecd0266821800f76f3c74
* Showing a default preview photo.Andrew Sapperstein2012-07-262-4/+20
| | | | | | | | | If we do not have a preview and are currently waiting on a full photo, we will show a stock photo. Currently shows a grey box as we do not have assets yet. Change-Id: I155071598b20bf81b2b60bdd8ac881a64b8ee1b7
* Finalized the photo viewer transitions.Andrew Sapperstein2012-07-251-12/+0
| | | | | | | | Changed the black background to be on the FrameLayout behind the view pager rather than on the the photo view. Also deleted some dead code. Change-Id: I19759d3f7e93c32b6c6aceda0c296610f90f20f7
* Added transitions to photo viewer.Andrew Sapperstein2012-07-241-1/+26
| | | | Change-Id: Ie3c9a36019e161cf0f7b32cfbeba4749ef5ccfd8
* Support showing previews in the photo viewer.Andrew Sapperstein2012-07-235-44/+69
| | | | | | | | | | | | | | | | The photo viewer now supports the notion of a preview of the full image. The preview is not pinchable in any manner and displays a circular progress bar over top of it while we are downloading the full version of the image. To enable this functionality, there is a new column in the PhotoContract API called thumbnailUri. If it is not set to null and if the attempted load of the contentUri is unsuccessful, we will attempt to load a thumbnail version that will show until the contentUri is finished loading. Change-Id: I5547a5fc6a30ee6a30f137dc1dee76a77fb5b304
* Reloading bitmaps if cursor updates.Andrew Sapperstein2012-07-235-152/+92
| | | | Change-Id: I5624e533d4f35255028cd1a31508dabdb33dfe7f
* Initial import of the photo viewer.Andrew Sapperstein2012-06-2512-0/+3531
Change-Id: Ia6b1cb2ae3b40ef004823a0d84fe3c2f52ed66e9