summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/widget
diff options
context:
space:
mode:
authorDaniel Lehmann <lehmannd@google.com>2012-04-14 14:52:27 -0700
committerDaniel Lehmann <lehmannd@google.com>2012-04-14 14:52:27 -0700
commite9a78643a9ded6239446e314968b9e9a195420c7 (patch)
tree894d2df9d565aedbb42c02463260c16447f22395 /src/com/android/contacts/widget
parent8b4cef3c56ab3fbd6e9585e5779d56da6dd4cd1b (diff)
downloadpackages_apps_Contacts-e9a78643a9ded6239446e314968b9e9a195420c7.tar.gz
packages_apps_Contacts-e9a78643a9ded6239446e314968b9e9a195420c7.tar.bz2
packages_apps_Contacts-e9a78643a9ded6239446e314968b9e9a195420c7.zip
Shortened the animation duration
Bug:5982894 Change-Id: Iae36b379d08a0e7a140953b77711b822f66d4965
Diffstat (limited to 'src/com/android/contacts/widget')
-rw-r--r--src/com/android/contacts/widget/PinnedHeaderListAdapter.java4
-rw-r--r--src/com/android/contacts/widget/PinnedHeaderListView.java7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/contacts/widget/PinnedHeaderListAdapter.java b/src/com/android/contacts/widget/PinnedHeaderListAdapter.java
index a4d375ed6..a39cfccb6 100644
--- a/src/com/android/contacts/widget/PinnedHeaderListAdapter.java
+++ b/src/com/android/contacts/widget/PinnedHeaderListAdapter.java
@@ -48,6 +48,7 @@ public abstract class PinnedHeaderListAdapter extends CompositeCursorAdapter
this.mPinnedPartitionHeadersEnabled = flag;
}
+ @Override
public int getPinnedHeaderCount() {
if (mPinnedPartitionHeadersEnabled) {
return getPartitionCount();
@@ -65,6 +66,7 @@ public abstract class PinnedHeaderListAdapter extends CompositeCursorAdapter
* The default implementation creates the same type of view as a normal
* partition header.
*/
+ @Override
public View getPinnedHeaderView(int partition, View convertView, ViewGroup parent) {
if (hasHeader(partition)) {
View view = null;
@@ -87,6 +89,7 @@ public abstract class PinnedHeaderListAdapter extends CompositeCursorAdapter
}
}
+ @Override
public void configurePinnedHeaders(PinnedHeaderListView listView) {
if (!mPinnedPartitionHeadersEnabled) {
return;
@@ -161,6 +164,7 @@ public abstract class PinnedHeaderListAdapter extends CompositeCursorAdapter
}
}
+ @Override
public int getScrollPositionForHeader(int viewIndex) {
return getPositionForPartition(viewIndex);
}
diff --git a/src/com/android/contacts/widget/PinnedHeaderListView.java b/src/com/android/contacts/widget/PinnedHeaderListView.java
index cef720378..1503879a6 100644
--- a/src/com/android/contacts/widget/PinnedHeaderListView.java
+++ b/src/com/android/contacts/widget/PinnedHeaderListView.java
@@ -74,7 +74,7 @@ public class PinnedHeaderListView extends AutoScrollListView
private static final int BOTTOM = 1;
private static final int FADING = 2;
- private static final int DEFAULT_ANIMATION_DURATION = 100;
+ private static final int DEFAULT_ANIMATION_DURATION = 20;
private static final class PinnedHeader {
View view;
@@ -149,6 +149,7 @@ public class PinnedHeaderListView extends AutoScrollListView
super.setOnItemSelectedListener(this);
}
+ @Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
int totalItemCount) {
if (mAdapter != null) {
@@ -187,6 +188,7 @@ public class PinnedHeaderListView extends AutoScrollListView
return mSize > 0 ? 0 : super.getTopFadingEdgeStrength();
}
+ @Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
mScrollState = scrollState;
if (mOnScrollListener != null) {
@@ -198,13 +200,13 @@ public class PinnedHeaderListView extends AutoScrollListView
* Ensures that the selected item is positioned below the top-pinned headers
* and above the bottom-pinned ones.
*/
+ @Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
int height = getHeight();
int windowTop = 0;
int windowBottom = height;
- int prevHeaderBottom = 0;
for (int i = 0; i < mSize; i++) {
PinnedHeader header = mHeaders[i];
if (header.visible) {
@@ -231,6 +233,7 @@ public class PinnedHeaderListView extends AutoScrollListView
}
}
+ @Override
public void onNothingSelected(AdapterView<?> parent) {
if (mOnItemSelectedListener != null) {
mOnItemSelectedListener.onNothingSelected(parent);