Merge "Add and use OverlappingPaneLayout"
diff --git a/res/drawable/floating_action_button.xml b/res/drawable/floating_action_button.xml
new file mode 100644
index 0000000..2f77232
--- /dev/null
+++ b/res/drawable/floating_action_button.xml
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval" >
+ <corners
+ android:radius="@dimen/floating_action_button_radius" />
+ <size
+ android:width="@dimen/floating_action_button_width"
+ android:height="@dimen/floating_action_button_height" />
+ <solid
+ android:color="@color/actionbar_background_color" />
+</shape>
\ No newline at end of file
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 172b110..6d04103 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -123,7 +123,7 @@
android:layout_marginRight="@dimen/floating_action_button_margin_right"
android:layout_marginBottom="@dimen/floating_action_button_margin_bottom"
android:id="@+id/floating_action_button"
- android:background="@color/actionbar_background_color"
+ android:background="@drawable/floating_action_button"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true" >
<ImageButton
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 53ff534..4dab285 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -52,10 +52,10 @@
<color name="item_selected">#660099cc</color>
<!-- Background color of new dialer activity -->
- <color name="background_dialer_light">#ebebeb</color>
+ <color name="background_dialer_light">#ffffff</color>
<!-- Background color of dialer list items (contacts, call log entries) -->
- <color name="background_dialer_list_items">#ebebeb</color>
+ <color name="background_dialer_list_items">#ffffff</color>
<!-- Background color of action bars. Ensure this stays in sync with packages/Telephony
actionbar_background_color. -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 766e86c..738a0b6 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -48,12 +48,11 @@
<item name="list_item_photo_size">@dimen/contact_browser_list_item_photo_size</item>
<item name="list_item_profile_photo_size">70dip</item>
<item name="list_item_prefix_highlight_color">@color/people_app_theme_color</item>
+ <item name="list_item_background_color">@color/background_dialer_light</item>
<item name="list_item_header_text_indent">8dip</item>
<item name="list_item_header_text_color">@color/people_app_theme_color</item>
<item name="list_item_header_text_size">14sp</item>
<item name="list_item_header_height">30dip</item>
- <item name="list_item_header_underline_height">1dip</item>
- <item name="list_item_header_underline_color">@color/favorite_contacts_separator_color</item>
<item name="list_item_data_width_weight">5</item>
<item name="list_item_label_width_weight">3</item>
<item name="contact_browser_list_padding_left">8dip</item>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 1b4002c..2e0225a 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -596,7 +596,7 @@
fragment = mRegularSearchFragment;
}
if (fragment != null && fragment.isVisible()) {
- fragment.getListView().animate().translationY(-mActionBarHeight)
+ fragment.getView().animate().translationY(-mActionBarHeight)
.setInterpolator(hideActionBarInterpolator).setDuration(ANIMATION_DURATION);
}
@@ -622,7 +622,7 @@
fragment = mRegularSearchFragment;
}
if (fragment != null && fragment.isVisible()) {
- fragment.getListView().animate().translationY(0)
+ fragment.getView().animate().translationY(0)
.setInterpolator(showActionBarInterpolator).setDuration(ANIMATION_DURATION);
}
diff --git a/src/com/android/dialer/SpecialCharSequenceMgr.java b/src/com/android/dialer/SpecialCharSequenceMgr.java
index 0b44fac..9d622aa 100644
--- a/src/com/android/dialer/SpecialCharSequenceMgr.java
+++ b/src/com/android/dialer/SpecialCharSequenceMgr.java
@@ -30,6 +30,7 @@
import android.os.Looper;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.provider.Settings;
import android.telephony.PhoneNumberUtils;
import android.telephony.TelephonyManager;
import android.util.Log;
@@ -258,10 +259,7 @@
private static boolean handleRegulatoryInfoDisplay(Context context, String input) {
if (input.equals(MMI_REGULATORY_INFO_DISPLAY)) {
Log.d(TAG, "handleRegulatoryInfoDisplay() sending intent to settings app");
- ComponentName regInfoDisplayActivity = new ComponentName(
- "com.android.settings", "com.android.settings.RegulatoryInfoDisplayActivity");
- Intent showRegInfoIntent = new Intent("android.settings.SHOW_REGULATORY_INFO");
- showRegInfoIntent.setComponent(regInfoDisplayActivity);
+ Intent showRegInfoIntent = new Intent(Settings.ACTION_SHOW_REGULATORY_INFO);
try {
context.startActivity(showRegInfoIntent);
} catch (ActivityNotFoundException e) {
diff --git a/src/com/android/dialer/list/AllContactsFragment.java b/src/com/android/dialer/list/AllContactsFragment.java
index 50f23aa..d05f66d 100644
--- a/src/com/android/dialer/list/AllContactsFragment.java
+++ b/src/com/android/dialer/list/AllContactsFragment.java
@@ -57,7 +57,6 @@
adapter.setDisplayPhotos(true);
adapter.setFilter(ContactListFilter.createFilterWithType(
ContactListFilter.FILTER_TYPE_WITH_PHONE_NUMBERS_ONLY));
- adapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(true /* opposite */));
adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
return adapter;
}
diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java
index c4fac69..f1cd5aa 100644
--- a/src/com/android/dialer/list/SearchFragment.java
+++ b/src/com/android/dialer/list/SearchFragment.java
@@ -18,6 +18,7 @@
import android.app.Activity;
import android.content.Intent;
import android.text.TextUtils;
+import android.view.View;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.ListView;
@@ -67,13 +68,15 @@
}
mActionBarHeight = ((DialtactsActivity) getActivity()).getActionBarHeight();
- final ListView listView = getListView();
- listView.setPaddingRelative(
- listView.getPaddingStart(),
+
+ final View parentView = getView();
+ parentView.setPaddingRelative(
+ parentView.getPaddingStart(),
mActionBarHeight,
- listView.getPaddingEnd(),
- listView.getPaddingBottom());
- listView.setClipToPadding(false);
+ parentView.getPaddingEnd(),
+ parentView.getPaddingBottom());
+
+ final ListView listView = getListView();
listView.setOnScrollListener(new OnScrollListener() {
@Override
@@ -88,7 +91,7 @@
});
if (!getActivity().getActionBar().isShowing()) {
- listView.setTranslationY(-mActionBarHeight);
+ parentView.setTranslationY(-mActionBarHeight);
}
}