summaryrefslogtreecommitdiffstats
path: root/carousel
Commit message (Collapse)AuthorAgeFilesLines
* Import translations. DO NOT MERGEBaligh Uddin2012-08-231-1/+1
| | | | | Change-Id: I2e8d65682d5a198cb6e7c199c4f96369bc618ed9 Auto-generated-cl: translation import
* Import translations. DO NOT MERGEEric Fischer2012-03-231-2/+2
| | | | Change-Id: I6ed4fd0b153689bf163d82c4b30879c2a1fb52c5
* Import revised translations.Eric Fischer2011-12-291-1/+1
| | | | Change-Id: I43380ab215b529e1f23c76fb58f2ff1fbfeee180
* Import revised translations.Eric Fischer2011-11-291-1/+1
| | | | Change-Id: I880296bb76b6a1d7226541b7587ae650182dd75d
* Port ICS tilt-style overscroll from java to rsBryan Mawhinney2011-11-161-31/+67
| | | | | | | | Code follows the java implementation as closely as possible to make comparisons and future bug fixes easy. Bug: 5613515 Change-Id: I14db2f2d659be919b4b12e5a7fe53af7ec137467
* Import revised translations.Eric Fischer2011-11-012-0/+56
| | | | Change-Id: I958131674c746b90d62b6e428b65e554983c52f6
* Import revised translations.Eric Fischer2011-10-181-0/+28
| | | | Change-Id: I85294e37b07eb6f024f86a0ddd9149085a01d9d6
* Add ability to set overscroll slot countBryan Mawhinney2011-09-094-5/+29
| | | | Change-Id: I10541172d99e1ede5b27bfcef106afadc0e540d4
* Import revised translations.Eric Fischer2011-09-022-5/+5
| | | | Change-Id: Iaf1b05b79b8628a1453fbb94e04eee3fbb72fe8b
* Import revised translations.Eric Fischer2011-08-2640-0/+1120
| | | | Change-Id: I67796f3c85ece30d3ad06b33eed63d7e85ad8eba
* Import revised translations.Eric Fischer2011-08-225-0/+140
| | | | Change-Id: I4eded0d405b56903aa46596f8c688d99d8c11abe
* Stop building with older SDK.Stephen Hines2011-08-091-1/+0
| | | | | | | | This causes issues with our new header file structure for Renderscript, since the build system is using the modern llvm-rs-cc with preexisting header files from before ICS. Change-Id: Ie20c7ee445451d2dcc12f7082f03d7204d1e8bf3
* Silence the parenthesis warning.Logan Chien2011-07-251-1/+1
| | | | Change-Id: I95527858918366b2fde54a71b0b831dda0551172
* Fix unreported bug with CarouselTestActivity where incorrect items were shown.Jim Miller2011-05-054-22/+43
| | | | | | | | | | | | The count was wrong for the number of items in the allocation pool since we now prefetch more data. Add demo code to show dialogs for events generated by Carousel (select texture, select detail, long press). Some other minor code cleanups. Change-Id: Iebecd1945c115d96bd60a3968985c1b104b586d6
* Clean up use of rsSetObject/rsClearObject.Stephen Hines2011-05-021-6/+6
| | | | Change-Id: Iee58e5260654883beece74a04fc5f3a2eae329cb
* Build android-common-carousel against the SDK 12.Ying Wang2011-03-291-3/+1
| | | | Change-Id: I2299266b21b4d7ded2501f87abe90e11e8ec22ad
* Fix 3404464: Minor tweak to Carousel scale-up animationJim Miller2011-03-021-1/+1
| | | | Change-Id: Ieb21634a68d8f5b9f1b411c547c18e32349c4d9e
* Fix 3404464: Add scale-down animation to CarouselJim Miller2011-03-022-30/+55
| | | | | | | | This changes the behavior to avoid snapping back to the original size, which was a very jarring effect. Instead, Carousel now has a scale-down animation that is triggered when the user releases the item. Change-Id: I81a91e65d0da991a98211f2ecb92fa89c8c81e22
* Draw 2 additional slots on either side of visibleSlotCount.Bryan Mawhinney2011-02-241-7/+9
| | | | | | This fixes an issue where book shadows disappeared too quickly. Change-Id: Idc8ef5af2c334fa4eb3f0514e79a25fd82f5cae8
* Merge "Don't treat prefetched cards as visible."Bryan Mawhinney2011-02-231-66/+81
|\
| * Don't treat prefetched cards as visible.Bryan Mawhinney2011-02-181-66/+81
| | | | | | | | | | | | | | | | Previously, prefetched cards were considered visible, which is inefficient when the number of cards to prefetch is large, and can confuse the hit detection logic (see b3468797) Change-Id: I91e150c52b88608eb8627edc8cce30ecfb44e672
* | Fix 3180048: Add finite velocity history tracking to CarouselJim Miller2011-02-161-11/+24
|/ | | | | | | | | | | Before this change, Carousel sometimes showed chaotic movement when a long history of motion was captured because of the infinite history of velocities used to calculate the average. The code now limits the number of historical velocities to a small number, which results in much more predictable motion. Change-Id: I4edadbde5464749646dcce50495e54b3abb73901
* Merge "Added a way to trigger an interpolated rotation of the carousel"Arnaud Berry2011-02-084-1/+148
|\
| * Added a way to trigger an interpolated rotation of the carouselArnaud Berry2011-02-074-1/+148
| | | | | | | | Change-Id: I4717952f5fe6b5d99699e55d93abcd1cb1fc1986
* | Update to public APIs.Jason Sams2011-02-031-3/+4
|/ | | | | | Remove use of private depricated APIs. Change-Id: I1f1fd0046bf5c9680b35c428afa40f5e4e19e222
* Disable long-press animationJim Shuma2011-01-311-1/+1
| | | | | Bug: 3404464 Change-Id: Ife6b29241e47727bc980753d0233da3a4a945779
* Merge "Proper error checking for setting cards" into honeycombJim Shuma2011-01-241-10/+28
|\
| * Proper error checking for setting cardsJim Shuma2011-01-231-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When shrinking the cards array while invalidates are still in flight, it's possible to have an invalidate or texture set land on a nonexistent card, causing an out-of-bounds exception to be thrown, crashing the app. Frequently these invalidates come from the user dragging the carousel to another position, so it's not feasible to prevent invalidates from being sent when we're about to clear the cards array; nor is it feasible to empty any pending invalidates, since Renderscript does not provide any meaningful inspection of the event queue. Therefore, the only real way we can address the problem is by detecting these out-of-turn invalidates and handling the errors cleanly. In practice, since these events are typically to invalidate a nonexistent card, it's OK to just drop them, since each such card is already invalid because it does not exist. This fix factors out card-get and card-set logic into common methods, similar to card-set-or-create logic that's been present for a long time. Bug: 3381300 Change-Id: I037801de3b4c3bff514b1586fa16417e32c118df
* | Invalidate unloaded textures to unloadedJim Shuma2011-01-231-6/+13
|/ | | | | | | | | | | | | | | | | | | | When invalidateTexture() is told to continue drawing the current texture until a replacement is found (STATE_STALE), but the texture was not there in the first place since it hadn't loaded yet, later attempts to draw the texture based on the assumption of its being there (by virtue of being in STATE_STALE or STATE_UPDATING) would result in rendering problems due to trying to bind a nonexistent texture. The fix is to make invalidateTexture() only set STATE_STALE if a valid texture had been there in the first place. As an added precautionary measure, this change also has a stopgap solution that will draw the placeholder image if the state machine indicates the texture is valid but it is not actually valid. This case should never be encountered. Bug: 3356101 Change-Id: Ia87e9e651f8ac3138faced3cf0f6199c58ee51e0
* Arrange cards based on default matrixJim Shuma2011-01-181-1/+1
| | | | | | | | | | | | | Previously we were arranging cards on the screen using the individual card's matrix. When the card matrices are different, however, this leads to an inconsistent layout. Instead, use the default card matrix for layout, while using the individaul card matrix (which, when not set separately, is the same as the default card matrix) for handling drawing the individual card. Bug: 3365044 Change-Id: Ibb7ad7760131d2c649cc0882b784c9d2e73a737f
* Fix bitrot in Carousel demo.Jim Miller2011-01-171-1/+1
| | | | Change-Id: I4151f20458b72f339bf636f7324b8dbbe33e6635
* Some names changed during API review, updating carousel to reflect them.Alex Sakhartchouk2011-01-131-1/+1
| | | | Change-Id: Ib08f4f7997d5e06891d5ce09cc7bff6c0f61f341
* Allow specifying per-card matricesJim Shuma2011-01-115-28/+111
| | | | | | | | | | | | | Set a per-card matrix through the newly expanded TextureParameters mechanism. This also changes the behavior of the card matrix so that it is applied locally to the card, rather than being applied to the whole carousel. And the detail texture is no longer drawn with the card matrix. Bug: 3206251 Change-Id: I5119bc97b136d32cf9d4e29e7aa3751334cc68c1
* Reset cards array on createCards(0)Jim Shuma2010-12-281-3/+2
| | | | | | | | | createCards(0) is used to clear out an array. As such, it's appropriate to entirely replace the array, rather than resizing to size 1, which leaves stale data behind. Bug: 3314456 Change-Id: Ifa1eb4a01ad9f5cc09c3cd6edce5de3f9602d9f0
* Renderscript API cleanupAlex Sakhartchouk2010-12-211-22/+26
| | | | Change-Id: I7235d93bbbcefd921294582d5f901e2a53d9701e
* Allow fading of the entire cardJim Shuma2010-12-163-17/+115
| | | | | | | | | Give cards an overall timestamp, separate from the texture timestamp. This allows cards to fade in before their texture has been set. Bug: 3281327 Change-Id: I9405636ebcbfc2c27d777d435f3abf24265dfbe9
* Remove unnecessary uploads.Jason Sams2010-12-161-1/+0
| | | | Change-Id: I6970953b717e6c667c5111a73db26a0bbe36e56e
* Fix a bug causing store config to be lost on rotateJim Shuma2010-12-152-1/+11
| | | | | | | Store configs were getting lost on orientation change, since they weren't being stored right. This fixes that. Change-Id: I4b256764347e3e7462fb4532254565d81bfc8980
* Update for Allocation API changes.Jason Sams2010-12-151-11/+8
| | | | Change-Id: If3b9d05825adf1bdb495f36e7d020af1bbdb5c7a
* Allow specifying configurations for mesh primitivesJim Shuma2010-12-143-58/+185
| | | | | | | | | This lets you specify separate alpha, depth read, and depth write behaviors for each primitive in your mesh. It will be used by Books to allow drawing shadows separately from the main model. Change-Id: I9351f720e6e09260b5bcd335e305922ff48cb373
* Allow top-to-bottom card order when rowCount>1Simon Wilson2010-12-144-1/+30
| | | | | | | | | Add a member function to CarouselRS.java called setFirstCardTop() to allow the first card to appear on top instead of the bottom when rowCount>1. The default is false, meaning the existing behaviour is not changed for other apps. Change-Id: I38d666958ebb802e211496895cbe3f91e78f5392
* Use ids rather than Meshes when specifying default / loading geometries.Bryan Mawhinney2010-12-093-22/+37
| | | | | | | This allows them to be reloaded when required, thus fixing http:/b/3237395 Change-Id: I9eea73d85a8c272debbfb45d5577ded185cf8112
* Add more feedback parameters to onCardLongPressJim Shuma2010-12-073-9/+22
| | | | | | | | | | onCardLongPress now passes information about the detail texture being passed, and where the touch happened. Also fixing a bug that caused long-press to be interpreted as selection. Change-Id: I4ee189c7c006abbc6ad71ac60778d1f18e8684a2
* Update to API cleanupJason Sams2010-12-063-11/+11
| | | | Change-Id: I3b5add1a98f10ca47cf26c004f8ca4f3353da1f8
* Exit overscroll mode when the user interacts with the carousel.Bryan Mawhinney2010-12-061-0/+1
| | | | | | | | This ensure that when the user releases the carousel, we don't automatically revert to overscroll mode unless we're still in the overscroll area. Change-Id: I1cec3380452383e2ba70b1dfab540a53e8289838
* Enable invalidation of carousel textures.Jeff Sharkey2010-12-023-6/+70
| | | | | | | | | Mirrors existing implementation of detail texture invalidation. Also fixes issue where eraseCurrent was being ignored. Fixes http://b/3246908. Change-Id: I7348536b43b1ccf6b7df2389a1100c3d5b1671a8
* Tap to stop the carouselJim Shuma2010-12-011-4/+5
| | | | | | | | | | | | | | When the carousel is moving faster than 15 degrees per second, a tap will stop the motion but not be interpreted as a selection. Slower than that, it will be considered a selection. This is an improvement on an earlier implementation because it lets through selections when the carousel is still moving slowly. Bug: 3179984 Change-Id: I27b55cf88e20d4ef1383ec0e4144f65a101f37fc
* Ensure default card matrix is set before creating cards.Bryan Mawhinney2010-11-301-1/+1
| | | | Change-Id: I3fd55a3332f319c2a3a7a9c9f1a1351e48c0d178
* Ensure that card 0 is properly initialized.Bryan Mawhinney2010-11-231-0/+6
| | | | | | | | Previously, when calling setCardCount(0) followed by setCardCount(n), only cards 1-n would be initialized. This prevented the first card from being drawn correctly. Change-Id: I5697553a6dba12825f546468747220ce67e904ef
* Allow user to specify a custom matrix to transform cards.Bryan Mawhinney2010-11-204-2/+54
| | | | Change-Id: I28901c4bdee160c06deae1167489510122d45e98