diff options
author | Jim Shuma <jshuma@google.com> | 2011-01-18 15:07:17 -0800 |
---|---|---|
committer | Jim Shuma <jshuma@google.com> | 2011-01-18 15:07:17 -0800 |
commit | 7d27aa4388936d7607407d25cc52d42e00f6567a (patch) | |
tree | 38797e3ffde65e62601ce56c7a3c650457047fc2 /carousel/java | |
parent | 396b1eb70452e27942550efaa06e10da84fc58db (diff) | |
download | android_frameworks_ex-7d27aa4388936d7607407d25cc52d42e00f6567a.tar.gz android_frameworks_ex-7d27aa4388936d7607407d25cc52d42e00f6567a.tar.bz2 android_frameworks_ex-7d27aa4388936d7607407d25cc52d42e00f6567a.zip |
Arrange cards based on default matrix
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
Diffstat (limited to 'carousel/java')
-rw-r--r-- | carousel/java/com/android/ex/carousel/carousel.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/carousel/java/com/android/ex/carousel/carousel.rs b/carousel/java/com/android/ex/carousel/carousel.rs index efccbd0..7468c6f 100644 --- a/carousel/java/com/android/ex/carousel/carousel.rs +++ b/carousel/java/com/android/ex/carousel/carousel.rs @@ -582,7 +582,7 @@ static float getVerticalOffsetForCard(int i) { return 0; } const float cardHeight = (cardVertices[3].y - cardVertices[0].y) * - rsMatrixGet(&cards[i].matrix, 1, 1); + rsMatrixGet(&defaultCardMatrix, 1, 1); const float totalHeight = rowCount * (cardHeight + rowSpacing) - rowSpacing; if (firstCardTop) i = rowCount - (i % rowCount) - 1; |