Merge "Fade out favorites screen when dialpad is displayed"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 0f3285e..3a643a8 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -67,7 +67,7 @@
dialpad screen. -->
<activity android:name=".DialtactsActivity"
android:label="@string/launcherDialer"
- android:theme="@style/DialtactsTheme"
+ android:theme="@style/DialtactsThemeHiddenActionBar"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:icon="@mipmap/ic_launcher_phone"
diff --git a/res/drawable-hdpi/dialer_recent_card_bg.9.png b/res/drawable-hdpi/dialer_recent_card_bg.9.png
deleted file mode 100644
index 2bfdbcb..0000000
--- a/res/drawable-hdpi/dialer_recent_card_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-hdpi/ic_tile_for_recents_and_contact_tile.9.png
new file mode 100644
index 0000000..b5f50de
--- /dev/null
+++ b/res/drawable-hdpi/ic_tile_for_recents_and_contact_tile.9.png
Binary files differ
diff --git a/res/drawable-mdpi/dialer_recent_card_bg.9.png b/res/drawable-mdpi/dialer_recent_card_bg.9.png
deleted file mode 100644
index dff6a0b..0000000
--- a/res/drawable-mdpi/dialer_recent_card_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-mdpi/ic_tile_for_recents_and_contact_tile.9.png
new file mode 100644
index 0000000..e43b3ef
--- /dev/null
+++ b/res/drawable-mdpi/ic_tile_for_recents_and_contact_tile.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/dialer_recent_card_bg.9.png b/res/drawable-xhdpi/dialer_recent_card_bg.9.png
deleted file mode 100644
index 05d254d..0000000
--- a/res/drawable-xhdpi/dialer_recent_card_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-xhdpi/ic_tile_for_recents_and_contact_tile.9.png
new file mode 100644
index 0000000..ebfe897
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tile_for_recents_and_contact_tile.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/dialer_recent_card_bg.9.png b/res/drawable-xxhdpi/dialer_recent_card_bg.9.png
deleted file mode 100644
index 87d95f0..0000000
--- a/res/drawable-xxhdpi/dialer_recent_card_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-xxhdpi/ic_tile_for_recents_and_contact_tile.9.png
new file mode 100644
index 0000000..0a99cdb
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_tile_for_recents_and_contact_tile.9.png
Binary files differ
diff --git a/res/drawable/shadow_fade_up.xml b/res/drawable/shadow_fade_up.xml
new file mode 100644
index 0000000..e2d9934
--- /dev/null
+++ b/res/drawable/shadow_fade_up.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle" >
+ <gradient
+ android:type="linear"
+ android:startColor="#66999999"
+ android:endColor="#00ffffff"
+ android:angle="90"/>
+</shape>
\ No newline at end of file
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index e39b413..e17dc27 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -147,12 +147,8 @@
<!-- The secondary action button; either play voicemail or call details. -->
<ImageButton
android:id="@+id/secondary_action_icon"
- android:layout_width="match_parent"
+ android:layout_width="fill_parent"
android:layout_height="match_parent"
- android:paddingStart="@dimen/call_log_inner_margin"
- android:paddingTop="@dimen/call_log_inner_margin"
- android:paddingBottom="@dimen/call_log_inner_margin"
- android:paddingEnd="@dimen/call_log_inner_margin"
android:scaleType="center"
android:background="?android:attr/selectableItemBackground"
android:nextFocusLeft="@id/primary_action_view"
diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml
index c3db420..c13f525 100644
--- a/res/layout/dialpad.xml
+++ b/res/layout/dialpad.xml
@@ -22,7 +22,6 @@
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="5dp"
- android:background="@android:color/transparent"
android:stretchColumns="*"
android:layoutDirection="ltr" >
diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml
index 239f727..dfe5c7c 100644
--- a/res/layout/dialpad_fragment.xml
+++ b/res/layout/dialpad_fragment.xml
@@ -25,7 +25,11 @@
android:layout_height="0dp"
android:layout_weight="1"
android:background="#00000000" />
-
+ <!-- Dialpad shadow -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="3dp"
+ android:background="@drawable/shadow_fade_up" />
<view class="com.android.dialer.dialpad.DialpadFragment$HoverIgnoringLinearLayout"
android:id="@+id/top"
android:animateLayoutChanges="true"
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml
index 8562b36..54f9de7 100644
--- a/res/layout/phone_favorite_tile_view.xml
+++ b/res/layout/phone_favorite_tile_view.xml
@@ -25,7 +25,8 @@
android:id="@+id/contact_favorite_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:focusable="true">
+ android:focusable="true"
+ android:background="@drawable/ic_tile_for_recents_and_contact_tile">
<com.android.contacts.common.widget.LayoutSuppressingImageView
android:id="@+id/contact_tile_image"
@@ -42,11 +43,11 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="8dp"
- android:paddingRight="@dimen/contact_tile_info_button_height_and_width"
- android:paddingStart="8dp"
- android:paddingEnd="@dimen/contact_tile_info_button_height_and_width"
- android:paddingBottom="12dp"
+ android:paddingLeft="@dimen/contact_tile_text_side_padding"
+ android:paddingRight="@dimen/contact_tile_text_side_padding"
+ android:paddingStart="@dimen/contact_tile_text_side_padding"
+ android:paddingEnd="@dimen/contact_tile_text_side_padding"
+ android:paddingBottom="@dimen/contact_tile_text_bottom_padding"
android:layout_alignParentBottom="true"
android:orientation="vertical" >
<TextView
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 6e563c1..f0e36bc 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -27,7 +27,7 @@
<!-- Call Log -->
<dimen name="call_log_call_action_size">32dip</dimen>
- <dimen name="call_log_call_action_width">48dip</dimen>
+ <dimen name="call_log_call_action_width">54dp</dimen>
<dimen name="call_log_icon_margin">4dip</dimen>
<dimen name="call_log_inner_margin">8dip</dimen>
<dimen name="call_log_outer_margin">8dip</dimen>
@@ -38,7 +38,7 @@
<dimen name="call_detail_button_spacing">2dip</dimen>
<!-- Defines the vertical margin for the vertical separator between
the main area of a call log entry and the secondary action button. -->
- <dimen name="call_log_list_item_vertical_divider_margin">8dp</dimen>
+ <dimen name="call_log_list_item_vertical_divider_margin">17dp</dimen>
<!-- Defines the width of the vertical separator between
the main area of a call log entry and the secondary action button. -->
@@ -73,6 +73,8 @@
<dimen name="contact_tile_divider_padding">3dp</dimen>
<dimen name="contact_tile_info_button_height_and_width">36dp</dimen>
<item name="contact_tile_height_to_width_ratio" type="dimen">67%</item>
+ <dimen name="contact_tile_text_side_padding">10dp</dimen>
+ <dimen name="contact_tile_text_bottom_padding">9dp</dimen>
<dimen name="favorites_row_top_padding">6dp</dimen>
<dimen name="favorites_row_bottom_padding">6dp</dimen>
<dimen name="favorites_row_start_padding">8dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 207ab6b..1025d0f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -77,6 +77,18 @@
<item name="favorites_padding_bottom">?android:attr/actionBarSize</item>
</style>
+ <!-- An extension of the main DialtactsTheme used when the the launcher activity is shown.
+ Ensures that there is no actionbar showing during the load of the dialer app. -->
+ <style name="DialtactsThemeHiddenActionBar" parent="DialtactsTheme">
+ <item name="android:actionBarStyle">@style/DialtactsHiddenActionBarStyle</item>
+ </style>
+
+ <!-- A "hidden" action bar style. Used when loading the launcher activity so that the
+ default actionbar is effectively hidden. -->
+ <style name="DialtactsHiddenActionBarStyle" parent="DialtactsActionBarStyle">
+ <item name="android:height">0dp</item>
+ </style>
+
<!-- Action bar overflow menu icon. -->
<style name="DialtactsActionBarOverflow"
parent="@android:style/Widget.Holo.ActionButton.Overflow">
diff --git a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java b/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java
index e09fc7d..e966f10 100644
--- a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java
+++ b/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java
@@ -345,7 +345,7 @@
@Override
public void addView(View view) {
- view.setBackgroundResource(R.drawable.dialer_recent_card_bg);
+ view.setBackgroundResource(R.drawable.ic_tile_for_recents_and_contact_tile);
final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java
index 16bf629..9761fc3 100644
--- a/src/com/android/dialer/list/PhoneFavoriteTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java
@@ -48,11 +48,11 @@
private static final String TAG = PhoneFavoriteTileView.class.getSimpleName();
private static final boolean DEBUG = false;
- // These parameters instruct the photo manager to display the default image/letter at 70% of
- // its normal size, and vertically offset upwards 20% towards the top of the letter tile, to
+ // These parameters instruct the photo manager to display the default image/letter at 65% of
+ // its normal size, and vertically offset upwards 17% towards the top of the letter tile, to
// make room for the contact name and number label at the bottom of the image.
- private static final float DEFAULT_IMAGE_LETTER_OFFSET = -0.2f;
- private static final float DEFAULT_IMAGE_LETTER_SCALE = 0.70f;
+ private static final float DEFAULT_IMAGE_LETTER_OFFSET = -0.17f;
+ private static final float DEFAULT_IMAGE_LETTER_SCALE = 0.65f;
/** Length of all animations in miniseconds. */
private int mAnimationDuration;