Merge "Import translations. DO NOT MERGE"
diff --git a/res/anim/slide_out.xml b/res/anim/slide_out.xml
index e037009..6b180c5 100644
--- a/res/anim/slide_out.xml
+++ b/res/anim/slide_out.xml
@@ -17,7 +17,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:valueFrom="0"
- android:valueTo="0.67"
+ android:valueTo="0.8"
android:valueType="floatType"
android:propertyName="yFraction"
- android:duration="200" />
\ No newline at end of file
+ android:duration="429" />
\ No newline at end of file
diff --git a/res/color/tab_text_color.xml b/res/color/tab_text_color.xml
index 629341e..5ef1fe3 100644
--- a/res/color/tab_text_color.xml
+++ b/res/color/tab_text_color.xml
@@ -16,6 +16,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="#fff" android:state_selected="true"/>
- <item android:color="#a3e7f0" />
+ <item android:color="@color/actionbar_text_color" android:state_selected="true"/>
+ <item android:color="@color/actionbar_unselected_text_color" />
</selector>
\ No newline at end of file
diff --git a/res/drawable/action_bar_tab.xml b/res/drawable/action_bar_tab.xml
index fe961f7..8a3ea7a 100644
--- a/res/drawable/action_bar_tab.xml
+++ b/res/drawable/action_bar_tab.xml
@@ -14,24 +14,25 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/tab_selected"
- android:state_focused="false"
- android:state_pressed="false"
- android:state_selected="true" />
- <item android:drawable="@drawable/tab_selected_focused"
- android:state_focused="true"
- android:state_pressed="false"
- android:state_selected="true" />
- <item android:drawable="@drawable/tab_unselected_focused"
- android:state_focused="true"
- android:state_pressed="false"
- android:state_selected="false" />
- <item android:drawable="@color/tab_pressed_color"
- android:state_pressed="true" />
- <item android:drawable="@drawable/tab_selected"
- android:state_selected="true" />
- <item android:drawable="@color/tab_default_color"
- android:state_selected="false" />
-</selector>
\ No newline at end of file
+<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android"
+ android:tint="@color/tab_pressed_color">
+ <item>
+ <selector>
+ <item android:drawable="@drawable/tab_selected"
+ android:state_focused="false"
+ android:state_pressed="false"
+ android:state_selected="true" />
+ <item android:drawable="@drawable/tab_selected_focused"
+ android:state_focused="true"
+ android:state_pressed="false"
+ android:state_selected="true" />
+ <item android:drawable="@drawable/tab_unselected_focused"
+ android:state_focused="true"
+ android:state_pressed="false"
+ android:state_selected="false" />
+ <item android:drawable="@drawable/tab_selected"
+ android:state_selected="true" />
+ <item android:drawable="@color/tab_default_color" />
+ </selector>
+ </item>
+</touch-feedback>
\ 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 eaf2a80..b7e9696 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -52,7 +52,6 @@
android:padding="@dimen/call_log_outer_margin"
android:orientation="horizontal"
android:gravity="center_vertical"
- android:background="?android:attr/selectableItemBackground"
android:focusable="true"
android:nextFocusRight="@+id/call_back_action"
android:nextFocusLeft="@+id/quick_contact_photo"
diff --git a/res/layout/dialpad_digits.xml b/res/layout/dialpad_digits.xml
deleted file mode 100644
index 55fd27e..0000000
--- a/res/layout/dialpad_digits.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014 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.
--->
-
-<!-- Text field and possibly soft menu button above the keypad where
- the digits are displayed. -->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/digits_container"
- android:layout_width="match_parent"
- android:layout_height="@dimen/dialpad_digits_height"
- android:orientation="horizontal">
-
- <view class="com.android.dialer.dialpad.DigitsEditText"
- android:id="@+id/digits"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:paddingLeft="@dimen/dialpad_digits_padding"
- android:scrollHorizontally="true"
- android:singleLine="true"
- android:layout_weight="1"
- android:gravity="center"
- android:background="@android:color/transparent"
- android:maxLines="1"
- android:textSize="@dimen/dialpad_digits_text_size"
- android:freezesText="true"
- android:focusableInTouchMode="true"
- android:cursorVisible="false"
- android:textColor="@color/dialpad_digits_text_color"
- android:textCursorDrawable="@null"
- android:fontFamily="sans-serif-light"
- android:textStyle="normal" />
-
- <ImageButton
- android:id="@+id/deleteButton"
- android:paddingLeft="@dimen/dialpad_digits_padding"
- android:paddingRight="@dimen/dialpad_digits_padding"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:state_enabled="false"
- android:background="@drawable/dialpad_key_colors"
- android:contentDescription="@string/description_delete_button"
- android:src="@drawable/ic_dial_action_delete" />
-</LinearLayout>
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index e4e2a23..8301659 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -59,7 +59,8 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:gravity="center"
- android:orientation="horizontal">
+ android:orientation="horizontal"
+ android:visibility="gone" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -102,4 +103,15 @@
android:src="@drawable/ic_dial_action_call"
android:visibility="gone" />
</FrameLayout>
+ <!-- Host container for the contact tile drag shadow -->
+ <FrameLayout
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+ <ImageView
+ android:id="@+id/contact_tile_drag_shadow_overlay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ android:importantForAccessibility="no" />
+ </FrameLayout>
</RelativeLayout>
diff --git a/res/layout/lists_fragment.xml b/res/layout/lists_fragment.xml
index d5b2bf8..f97b336 100644
--- a/res/layout/lists_fragment.xml
+++ b/res/layout/lists_fragment.xml
@@ -36,7 +36,7 @@
<com.android.dialer.list.ViewPagerTabs
android:id="@+id/lists_pager_header"
android:layout_width="match_parent"
- android:layout_height="?android:attr/actionBarSize"
+ android:layout_height="@dimen/tab_height"
android:textAllCaps="true"
android:orientation="horizontal"
android:layout_gravity="top"
diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml
index 89a9f73..76e5e98 100644
--- a/res/layout/phone_favorites_fragment.xml
+++ b/res/layout/phone_favorites_fragment.xml
@@ -40,13 +40,6 @@
android:clipToPadding="false"
android:fadingEdge="none"
android:divider="@null" />
-
- <ImageView
- android:id="@+id/contact_tile_drag_shadow_overlay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone"
- android:importantForAccessibility="no" />
</FrameLayout>
<include
diff --git a/res/values/colors.xml b/res/values/colors.xml
index fa0fc34..78e2301 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -92,7 +92,8 @@
<!-- Color of action bar text. Ensure this stays in sync with packages/Telephony
phone_settings_actionbar_text_color-->
- <color name="actionbar_text_color">#FFFFFF</color>
+ <color name="actionbar_text_color">#ffffff</color>
+ <color name="actionbar_unselected_text_color">#a6ffffff</color>
<!-- Color of actions in expanded call log entries. This text color represents actions such
as call back, play voicemail, etc. -->
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c9eeacf..3495a6d 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -110,8 +110,11 @@
<dimen name="search_box_text_left_margin">8dp</dimen>
<!-- Size of the icon (voice search, close search) in the search box. -->
<dimen name="search_box_icon_size">37dp</dimen>
+
<!-- Size of text in tabs. -->
- <dimen name="tab_text_size">13sp</dimen>
+ <dimen name="tab_height">43dp</dimen>
+ <dimen name="tab_text_size">14sp</dimen>
+
<!-- Padding to the left and right of call log action buttons. -->
<dimen name="call_log_action_horizontal_padding">8dp</dimen>
<!-- Left-padding for the call log action buttons - ensures the buttons align with the text
@@ -125,4 +128,6 @@
<dimen name="call_log_secondary_text_size">14sp</dimen>
<!-- Height of the call log actions section for each call log entry -->
<dimen name="call_log_action_height">48dp</dimen>
+ <!-- Elevation of expanded call log items. -->
+ <dimen name="call_log_expanded_elevation">4dp</dimen>
</resources>
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index a8cd72a..8bd4c08 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -769,6 +769,10 @@
if (expanded) {
views.actionsView.setVisibility(View.VISIBLE);
+ callLogItem.setBackgroundColor(
+ callLogItem.getResources().getColor(R.color.background_dialer_light));
+ callLogItem.setElevation(
+ callLogItem.getResources().getDimension(R.dimen.call_log_expanded_elevation));
// Attempt to give accessibility focus to one of the action buttons.
// This ensures that a user realizes the expansion occurred.
@@ -780,6 +784,9 @@
views.deleteButtonView.requestAccessibilityFocus();
} else {
views.actionsView.setVisibility(View.GONE);
+ callLogItem.setBackgroundColor(
+ callLogItem.getResources().getColor(R.color.background_dialer_list_items));
+ callLogItem.setElevation(0);
}
}
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java
index 2456294..ba4ae7b 100644
--- a/src/com/android/dialer/dialpad/DialpadFragment.java
+++ b/src/com/android/dialer/dialpad/DialpadFragment.java
@@ -1608,12 +1608,15 @@
public void onHiddenChanged(boolean hidden) {
super.onHiddenChanged(hidden);
final DialtactsActivity activity = (DialtactsActivity) getActivity();
+ final DialpadView dialpadView = (DialpadView) getView().findViewById(R.id.dialpad_view);
if (activity == null) return;
if (hidden) {
+ if (mAnimate) {
+ dialpadView.animateHide();
+ }
activity.onDialpadHidden();
} else {
if (mAnimate) {
- DialpadView dialpadView = (DialpadView) getView().findViewById(R.id.dialpad_view);
dialpadView.animateShow();
}
activity.onDialpadShown();
diff --git a/src/com/android/dialer/list/PhoneFavoriteListView.java b/src/com/android/dialer/list/PhoneFavoriteListView.java
index 074cc07..4ecc1cd 100644
--- a/src/com/android/dialer/list/PhoneFavoriteListView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteListView.java
@@ -59,6 +59,7 @@
private Bitmap mDragShadowBitmap;
private ImageView mDragShadowOverlay;
+ private View mDragShadowParent;
private int mAnimationDuration;
final int[] mLocationOnScreen = new int[2];
@@ -190,6 +191,7 @@
public void setDragShadowOverlay(ImageView overlay) {
mDragShadowOverlay = overlay;
+ mDragShadowParent = (View) mDragShadowOverlay.getParent();
}
/**
@@ -230,10 +232,21 @@
return;
}
- // Square tile is relative to the contact tile,
- // and contact tile is relative to this list view.
- mDragShadowLeft = tileView.getLeft();
- mDragShadowTop = tileView.getTop();
+ tileView.getLocationOnScreen(mLocationOnScreen);
+ mDragShadowLeft = mLocationOnScreen[0];
+ mDragShadowTop = mLocationOnScreen[1];
+
+ // x and y are the coordinates of the on-screen touch event. Using these
+ // and the on-screen location of the tileView, calculate the difference between
+ // the position of the user's finger and the position of the tileView. These will
+ // be used to offset the location of the drag shadow so that it appears that the
+ // tileView is positioned directly under the user's finger.
+ mTouchOffsetToChildLeft = x - mDragShadowLeft;
+ mTouchOffsetToChildTop = y - mDragShadowTop;
+
+ mDragShadowParent.getLocationOnScreen(mLocationOnScreen);
+ mDragShadowLeft -= mLocationOnScreen[0];
+ mDragShadowTop -= mLocationOnScreen[1];
mDragShadowOverlay.setImageBitmap(mDragShadowBitmap);
mDragShadowOverlay.setVisibility(VISIBLE);
@@ -241,19 +254,14 @@
mDragShadowOverlay.setX(mDragShadowLeft);
mDragShadowOverlay.setY(mDragShadowTop);
-
- // x and y passed in are the coordinates of where the user has touched down,
- // calculate the offset to the top left coordinate of the dragged child. This
- // will be used for drawing the drag shadow.
- mTouchOffsetToChildLeft = x - mDragShadowLeft;
- mTouchOffsetToChildTop = y - mDragShadowTop;
}
@Override
public void onDragHovered(int x, int y, PhoneFavoriteSquareTileView tileView) {
// Update the drag shadow location.
- mDragShadowLeft = x - mTouchOffsetToChildLeft;
- mDragShadowTop = y - mTouchOffsetToChildTop;
+ mDragShadowParent.getLocationOnScreen(mLocationOnScreen);
+ mDragShadowLeft = x - mTouchOffsetToChildLeft - mLocationOnScreen[0];
+ mDragShadowTop = y - mTouchOffsetToChildTop - mLocationOnScreen[1];
// Draw the drag shadow at its last known location if the drag shadow exists.
if (mDragShadowOverlay != null) {
mDragShadowOverlay.setX(mDragShadowLeft);
@@ -263,10 +271,6 @@
@Override
public void onDragFinished(int x, int y) {
- // Update the drag shadow location.
- mDragShadowLeft = x - mTouchOffsetToChildLeft;
- mDragShadowTop = y - mTouchOffsetToChildTop;
-
if (mDragShadowOverlay != null) {
mDragShadowOverlay.clearAnimation();
mDragShadowOverlay.animate().alpha(0.0f)
diff --git a/src/com/android/dialer/list/SpeedDialFragment.java b/src/com/android/dialer/list/SpeedDialFragment.java
index cfcea9d..0399bf7 100644
--- a/src/com/android/dialer/list/SpeedDialFragment.java
+++ b/src/com/android/dialer/list/SpeedDialFragment.java
@@ -206,7 +206,7 @@
mListView.getDragDropController().addOnDragDropListener(mContactTileAdapter);
final ImageView dragShadowOverlay =
- (ImageView) mParentView.findViewById(R.id.contact_tile_drag_shadow_overlay);
+ (ImageView) getActivity().findViewById(R.id.contact_tile_drag_shadow_overlay);
mListView.setDragShadowOverlay(dragShadowOverlay);
mEmptyView = mParentView.findViewById(R.id.phone_no_favorites_view);