From 3a18654bf87df4f17880551b6cfa45c871917960 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Tue, 7 May 2013 11:59:36 -0700 Subject: Animation for smart dialing suggestions Suggestions now appear with a fade in and slide up animation. Suggestions vanish with a fade out and slide down animation. If a suggestion is moved into the middle, it slides to the left/right as appropriate. Change the layout containing suggestions to a LinearLayout, in order to better support animations. Renamed SmartDialAdapter to SmartDialController, and also refactored it to handle entries for a LinearLayout instead of a GridView, as well as adding animation support and view management. Use null object pattern in SmartDialEntry to better handle null entries. Start displaying suggestions on the first digit entered. Bug 8840240 Change-Id: If4e16006c0b36d2244434e0b2d8f3d3b997b0ad2 --- res/layout/dialpad_fragment.xml | 30 +++++++++++++++++++++--------- res/layout/dialpad_smartdial_item.xml | 12 ++++++++---- res/values/colors.xml | 7 ++++--- 3 files changed, 33 insertions(+), 16 deletions(-) (limited to 'res') diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml index 13d91bd27..f3bd2a213 100644 --- a/res/layout/dialpad_fragment.xml +++ b/res/layout/dialpad_fragment.xml @@ -57,17 +57,29 @@ android:src="@drawable/ic_dial_action_delete" /> - - + + android:layout_marginTop="@dimen/dialpad_vertical_margin"> + + + + + diff --git a/res/layout/dialpad_smartdial_item.xml b/res/layout/dialpad_smartdial_item.xml index 54f2a084e..32d801e80 100644 --- a/res/layout/dialpad_smartdial_item.xml +++ b/res/layout/dialpad_smartdial_item.xml @@ -16,15 +16,19 @@ + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="match_parent" + android:layout_marginTop="2dp" + android:layout_marginBottom="2dp" + android:background="?android:attr/selectableItemBackground"> diff --git a/res/values/colors.xml b/res/values/colors.xml index 288f58b64..1aa217fe8 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -18,9 +18,10 @@ #888888 - #39caff - #39caff - #ffffff + #0099cc + #39c9ff + #bbbbbb + #ffffff #FF0000 -- cgit v1.2.3