diff options
-rw-r--r-- | res/drawable/shadow_fade_up.xml | 4 | ||||
-rw-r--r-- | res/layout/dialpad_fragment.xml | 2 | ||||
-rw-r--r-- | res/values/colors.xml | 1 | ||||
-rw-r--r-- | res/values/styles.xml | 2 | ||||
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 23 |
5 files changed, 20 insertions, 12 deletions
diff --git a/res/drawable/shadow_fade_up.xml b/res/drawable/shadow_fade_up.xml index e2d993484..e961c860a 100644 --- a/res/drawable/shadow_fade_up.xml +++ b/res/drawable/shadow_fade_up.xml @@ -18,7 +18,7 @@ android:shape="rectangle" > <gradient android:type="linear" - android:startColor="#66999999" - android:endColor="#00ffffff" + android:startColor="#1a000000" + android:endColor="@null" android:angle="90"/> </shape>
\ No newline at end of file diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml index 33324d1e0..b2312ada0 100644 --- a/res/layout/dialpad_fragment.xml +++ b/res/layout/dialpad_fragment.xml @@ -28,7 +28,7 @@ <!-- Dialpad shadow --> <View android:layout_width="match_parent" - android:layout_height="3dp" + android:layout_height="10dp" android:background="@drawable/shadow_fade_up" /> <include layout="@layout/dialpad_view" /> <!-- "Dialpad chooser" UI, shown only when the user brings up the diff --git a/res/values/colors.xml b/res/values/colors.xml index 38b8daec0..70adb36ac 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -21,6 +21,7 @@ <color name="dialtacts_secondary_text_color">#888888</color> <color name="dialer_accent_color">#eeff41</color> + <color name="contact_list_background_color">#f2f2f2</color> <!-- Color of the text describing an unconsumed missed call. --> <color name="call_log_missed_call_highlight_color">#FF0000</color> diff --git a/res/values/styles.xml b/res/values/styles.xml index a45d1e787..e541b0b2b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -57,7 +57,7 @@ <item name="list_item_label_width_weight">3</item> <item name="contact_browser_list_padding_left">8dip</item> <item name="contact_browser_list_padding_right">0dip</item> - <item name="contact_browser_background">@android:color/transparent</item> + <item name="contact_browser_background">@color/contact_list_background_color</item> <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item> <!-- CallLog --> <item name="call_log_primary_text_color">#000000</item> diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 7aaa89742..7f9200eb4 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -16,10 +16,7 @@ package com.android.dialer; -import android.animation.Animator; import android.animation.LayoutTransition; -import android.animation.Animator.AnimatorListener; -import android.animation.AnimatorListenerAdapter; import android.app.ActionBar; import android.app.Activity; import android.app.Fragment; @@ -133,6 +130,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O private static final int ANIMATION_DURATION = 250; + private RelativeLayout parentLayout; + /** * Fragment containing the dialpad that slides into view */ @@ -154,7 +153,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O private ListsFragment mListsFragment; private View mFloatingActionButton; - private View mMenuButton; private View mDialpadButton; private View mDialButton; @@ -203,6 +201,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O private DialerDatabaseHelper mDialerDatabaseHelper; private DragDropController mDragDropController; + private int mDialerBackgroundColor; + private int mContactListBackgroundColor; + private class OverflowPopupMenu extends PopupMenu { public OverflowPopupMenu(Context context, View anchor) { super(context, anchor); @@ -364,8 +365,13 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mFirstLaunch = savedInstanceState.getBoolean(KEY_FIRST_LAUNCH); } - RelativeLayout parent = (RelativeLayout) findViewById(R.id.dialtacts_mainlayout); - parent.getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING); + parentLayout = (RelativeLayout) findViewById(R.id.dialtacts_mainlayout); + parentLayout.getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING); + parentLayout.setOnDragListener(new LayoutOnDragListener()); + + mDialerBackgroundColor = getResources().getColor(R.color.background_dialer_light); + mContactListBackgroundColor = + getResources().getColor(R.color.contact_list_background_color); mFragmentsFrame = findViewById(R.id.dialtacts_frame); @@ -381,8 +387,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mDialerDatabaseHelper = DatabaseHelperManager.getDatabaseHelper(this); SmartDialPrefix.initializeNanpSettings(this); - - findViewById(R.id.dialtacts_mainlayout).setOnDragListener(new LayoutOnDragListener()); } @Override @@ -625,6 +629,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O if (mListsFragment != null && mListsFragment.isResumed() && mListsFragment.isVisible()) { // If the favorites fragment is showing, fade to blank. mFragmentsFrame.animate().alpha(0.0f); + parentLayout.setBackgroundColor(mContactListBackgroundColor); } getActionBar().hide(); alignFloatingActionButtonMiddle(); @@ -650,6 +655,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O if (mListsFragment != null && mListsFragment.isVisible()) { mFragmentsFrame.animate().alpha(1.0f); + parentLayout.setBackgroundColor(mDialerBackgroundColor); + } getActionBar().show(); alignFloatingActionButtonByTab(mCurrentTabPosition); |