summaryrefslogtreecommitdiff
path: root/src/com/android/contacts/widget
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-09-23 14:44:17 -0700
committerBrian Attwell <brianattwell@google.com>2014-09-23 14:45:44 -0700
commitf37ba16e057670884e67d3cb6654fac3b29b53d8 (patch)
tree708648a45acd021df4a2d6a1faabba551f1d9397 /src/com/android/contacts/widget
parent820dbff1b94d28b3c3570019df222179df29916f (diff)
downloadContacts-f37ba16e057670884e67d3cb6654fac3b29b53d8.tar.gz
Remove click-to-collapse from QC
Bug: 17625895 Bug: 17471953 Change-Id: I3bc8bf3370dc2afd3dc003fc545b73aacacfe93b
Diffstat (limited to 'src/com/android/contacts/widget')
-rw-r--r--src/com/android/contacts/widget/MultiShrinkScroller.java33
1 files changed, 6 insertions, 27 deletions
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java
index 1b4f1c33f..dfec204b6 100644
--- a/src/com/android/contacts/widget/MultiShrinkScroller.java
+++ b/src/com/android/contacts/widget/MultiShrinkScroller.java
@@ -191,13 +191,6 @@ public class MultiShrinkScroller extends FrameLayout {
void onExitFullscreen();
}
- private final AnimatorListener mHeaderExpandAnimationListener = new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- mPhotoTouchInterceptOverlay.setClickable(true);
- }
- };
-
private final AnimatorListener mSnapToBottomListener = new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
@@ -310,7 +303,7 @@ public class MultiShrinkScroller extends FrameLayout {
mPhotoTouchInterceptOverlay.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- expandCollapseHeader();
+ expandHeader();
}
});
}
@@ -494,27 +487,18 @@ public class MultiShrinkScroller extends FrameLayout {
}
/**
- * Expand to maximum size or starting size. Disable clicks on the photo until the animation is
- * complete.
+ * Expand to maximum size.
*/
- private void expandCollapseHeader() {
- mPhotoTouchInterceptOverlay.setClickable(false);
+ private void expandHeader() {
if (getHeaderHeight() != mMaximumHeaderHeight) {
- // Expand header
final ObjectAnimator animator = ObjectAnimator.ofInt(this, "headerHeight",
mMaximumHeaderHeight);
- animator.addListener(mHeaderExpandAnimationListener);
animator.setDuration(ExpandingEntryCardView.DURATION_EXPAND_ANIMATION_CHANGE_BOUNDS);
animator.start();
// Scroll nested scroll view to its top
if (mScrollView.getScrollY() != 0) {
ObjectAnimator.ofInt(mScrollView, "scrollY", -mScrollView.getScrollY()).start();
}
- } else if (getHeaderHeight() != mMinimumHeaderHeight) {
- final ObjectAnimator animator = ObjectAnimator.ofInt(this, "headerHeight",
- mIntermediateHeaderHeight);
- animator.addListener(mHeaderExpandAnimationListener);
- animator.start();
}
}
@@ -903,17 +887,10 @@ public class MultiShrinkScroller extends FrameLayout {
/**
* Returns the minimum size that we want to compress the header to, given that we don't want to
* allow the the ScrollView to scroll unless there is new content off of the edge of ScrollView.
- * This value is never smaller than the current header height.
*/
private int getFullyCompressedHeaderHeight() {
- final int minimumScrollableHeaderHeight =
- Math.min(Math.max(mToolbar.getLayoutParams().height - getOverflowingChildViewSize(),
+ return Math.min(Math.max(mToolbar.getLayoutParams().height - getOverflowingChildViewSize(),
mMinimumHeaderHeight), getMaximumScrollableHeaderHeight());
- // It is possible that the current header height is smaller than the minimum height
- // that can be obtained by scrolling since tapping on the contact photo collapses it.
- // In this case, just return the current height or the minimum height.
- return Math.max(Math.min(minimumScrollableHeaderHeight, mToolbar.getLayoutParams().height),
- mMinimumHeaderHeight);
}
/**
@@ -973,6 +950,8 @@ public class MultiShrinkScroller extends FrameLayout {
mLargeTextView.setPivotY(mLargeTextView.getHeight() / 2);
final int toolbarHeight = mToolbar.getLayoutParams().height;
+ mPhotoTouchInterceptOverlay.setClickable(toolbarHeight != mMaximumHeaderHeight);
+
if (toolbarHeight >= mMaximumHeaderHeight) {
// Everything is full size when the header is fully expanded.
mLargeTextView.setScaleX(1);