Try this out with experimenters to see if the scrolling is reasonable.
It seems that what annoyed arubin was that focusing the item changed the scroll
position
So I am now just changing it when the user actually starts entering text
Change-Id: I8868cde2fc90b1e253c50fd3fad900f811442e6d
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index 39a481b..9ce792a 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -2137,6 +2137,8 @@
editable.delete(tokenStart, tokenEnd);
getSpannable().removeSpan(repl[0]);
}
+ } else {
+ scrollBottomIntoView();
}
}
@@ -2146,6 +2148,12 @@
}
}
+ private void scrollBottomIntoView() {
+ if (mScrollView != null) {
+ mScrollView.scrollBy(0, (int)(getLineCount() * mChipHeight));
+ }
+ }
+
/**
* Handles pasting a {@link ClipData} to this {@link RecipientEditTextView}.
*/