summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-02-02 15:06:36 -0800
committerSvetoslav Ganov <svetoslavganov@google.com>2011-02-02 15:17:24 -0800
commit4fd9dae6a23a22142f73749c291c9fd18459e381 (patch)
tree3d060d4153d4cf6ec367a9961d7f08014304e8e8 /core
parent6f6ef48dc9a40d6afe2b66db4d1a411771e85a5b (diff)
downloadframeworks_base-4fd9dae6a23a22142f73749c291c9fd18459e381.zip
frameworks_base-4fd9dae6a23a22142f73749c291c9fd18459e381.tar.gz
frameworks_base-4fd9dae6a23a22142f73749c291c9fd18459e381.tar.bz2
NumberPicker should not play initial animation while in edit mode
bug:3417930 1. Added a check if the widget is in edit mode to determine if to play the initial annimation. Change-Id: Ibcf23fa1ec55a1950323e71eda90da6418b655fb
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/NumberPicker.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index c5b1caa..8e660ff 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -583,7 +583,7 @@ public class NumberPicker extends LinearLayout {
updateInputTextView();
updateIncrementAndDecrementButtonsVisibilityState();
- if (mFlingable) {
+ if (mFlingable && !isInEditMode()) {
// Start with shown selector wheel and hidden controls. When made
// visible hide the selector and fade-in the controls to suggest
// fling interaction.
@@ -1056,7 +1056,7 @@ public class NumberPicker extends LinearLayout {
super.onAttachedToWindow();
// make sure we show the controls only the very
// first time the user sees this widget
- if (mFlingable) {
+ if (mFlingable && !isInEditMode()) {
// animate a bit slower the very first time
showInputControls(mShowInputControlsAnimimationDuration * 2);
}