summaryrefslogtreecommitdiffstats
path: root/carousel/java
diff options
context:
space:
mode:
authorJim Shuma <jshuma@google.com>2011-01-18 15:07:17 -0800
committerJim Shuma <jshuma@google.com>2011-01-18 15:07:17 -0800
commit7d27aa4388936d7607407d25cc52d42e00f6567a (patch)
tree38797e3ffde65e62601ce56c7a3c650457047fc2 /carousel/java
parent396b1eb70452e27942550efaa06e10da84fc58db (diff)
downloadandroid_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.rs2
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;