summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-11-14 01:36:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-11-14 01:36:16 +0000
commit349f3e1b6c5642636fbe4480a47b568e47c92154 (patch)
tree0714efbeee5febae4609f45b40e70f03433b4055
parent59a3943236380a1b6e2a922caf6bc85ad2c29f15 (diff)
parent41a24b477dd0c550eda011a1b591603a20b980be (diff)
Merge "Color/layout tweaks for Dialer" into klp-dev
-rw-r--r--res/drawable-hdpi/dialer_recent_card_bg.9.pngbin191 -> 199 bytes
-rw-r--r--res/drawable-hdpi/ic_ab_search.pngbin0 -> 1113 bytes
-rw-r--r--res/drawable-mdpi/dialer_recent_card_bg.9.pngbin178 -> 180 bytes
-rw-r--r--res/drawable-mdpi/ic_ab_search.pngbin0 -> 743 bytes
-rw-r--r--res/drawable-xhdpi/dialer_recent_card_bg.9.pngbin212 -> 226 bytes
-rw-r--r--res/drawable-xhdpi/ic_ab_search.pngbin0 -> 1588 bytes
-rw-r--r--res/drawable-xxhdpi/dialer_recent_card_bg.9.pngbin179 -> 244 bytes
-rw-r--r--res/drawable-xxhdpi/ic_ab_search.pngbin0 -> 1503 bytes
-rw-r--r--res/layout/dialtacts_activity.xml63
-rw-r--r--res/values/colors.xml4
-rw-r--r--res/values/dimens.xml2
-rw-r--r--src/com/android/dialer/DialtactsActivity.java18
12 files changed, 54 insertions, 33 deletions
diff --git a/res/drawable-hdpi/dialer_recent_card_bg.9.png b/res/drawable-hdpi/dialer_recent_card_bg.9.png
index e58194331..2bfdbcb9c 100644
--- a/res/drawable-hdpi/dialer_recent_card_bg.9.png
+++ b/res/drawable-hdpi/dialer_recent_card_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_ab_search.png b/res/drawable-hdpi/ic_ab_search.png
new file mode 100644
index 000000000..3702846fd
--- /dev/null
+++ b/res/drawable-hdpi/ic_ab_search.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
index cb1d26fc8..dff6a0b84 100644
--- a/res/drawable-mdpi/dialer_recent_card_bg.9.png
+++ b/res/drawable-mdpi/dialer_recent_card_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_ab_search.png b/res/drawable-mdpi/ic_ab_search.png
new file mode 100644
index 000000000..cc9f9117f
--- /dev/null
+++ b/res/drawable-mdpi/ic_ab_search.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
index e1a4b67fd..05d254d6a 100644
--- a/res/drawable-xhdpi/dialer_recent_card_bg.9.png
+++ b/res/drawable-xhdpi/dialer_recent_card_bg.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_ab_search.png b/res/drawable-xhdpi/ic_ab_search.png
new file mode 100644
index 000000000..718ff4943
--- /dev/null
+++ b/res/drawable-xhdpi/ic_ab_search.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
index 614207878..87d95f0ed 100644
--- a/res/drawable-xxhdpi/dialer_recent_card_bg.9.png
+++ b/res/drawable-xxhdpi/dialer_recent_card_bg.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_ab_search.png b/res/drawable-xxhdpi/ic_ab_search.png
new file mode 100644
index 000000000..4bb5165c9
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_ab_search.png
Binary files differ
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 255eb49fb..e2c385364 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -81,36 +81,41 @@
android:id="@+id/dialtacts_frame"
android:clipChildren="false">
</FrameLayout>
+ <View
+ android:layout_height="2dp"
+ android:layout_width="match_parent"
+ android:background="#33999999"
+ />
<FrameLayout
- android:layout_height="@dimen/fake_action_bar_height"
- android:layout_width="match_parent"
- android:id="@+id/fake_action_bar"
- android:background="@color/actionbar_background_color">
- <ImageButton
- android:id="@+id/call_history_button"
- android:layout_width="@dimen/fake_menu_button_min_width"
- android:layout_height="match_parent"
- android:layout_gravity="bottom|start"
- android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/action_menu_call_history_description"
- android:src="@drawable/ic_menu_history_dk"/>
- <ImageButton
- android:id="@+id/dialpad_button"
- android:layout_width="@dimen/fake_menu_button_min_width"
- android:layout_height="match_parent"
- android:layout_gravity="bottom|center"
- android:background="?android:attr/selectableItemBackground"
- android:contentDescription="@string/action_menu_dialpad_button"
- android:src="@drawable/ic_menu_dialpad_dk"/>
- <ImageButton
- android:id="@+id/overflow_menu"
- android:layout_width="@dimen/fake_menu_button_min_width"
- android:layout_height="match_parent"
- android:layout_gravity="bottom|end"
- android:src="@drawable/ic_menu_overflow_dk"
- android:contentDescription="@string/action_menu_overflow_description"
- android:background="?android:attr/selectableItemBackground"/>
- </FrameLayout>
+ android:layout_height="@dimen/fake_action_bar_height"
+ android:layout_width="match_parent"
+ android:id="@+id/fake_action_bar"
+ android:background="@color/actionbar_background_color">
+ <ImageButton
+ android:id="@+id/call_history_button"
+ android:layout_width="@dimen/fake_menu_button_min_width"
+ android:layout_height="match_parent"
+ android:layout_gravity="bottom|start"
+ android:background="?android:attr/selectableItemBackground"
+ android:contentDescription="@string/action_menu_call_history_description"
+ android:src="@drawable/ic_menu_history_dk"/>
+ <ImageButton
+ android:id="@+id/dialpad_button"
+ android:layout_width="@dimen/fake_menu_button_min_width"
+ android:layout_height="match_parent"
+ android:layout_gravity="bottom|center"
+ android:background="?android:attr/selectableItemBackground"
+ android:contentDescription="@string/action_menu_dialpad_button"
+ android:src="@drawable/ic_menu_dialpad_dk"/>
+ <ImageButton
+ android:id="@+id/overflow_menu"
+ android:layout_width="@dimen/fake_menu_button_min_width"
+ android:layout_height="match_parent"
+ android:layout_gravity="bottom|end"
+ android:src="@drawable/ic_menu_overflow_dk"
+ android:contentDescription="@string/action_menu_overflow_description"
+ android:background="?android:attr/selectableItemBackground"/>
+ </FrameLayout>
<View
android:id="@+id/dialtacts_bottom_padding"
android:layout_width="match_parent"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 439ccc229..7cbe1f9d4 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -41,7 +41,7 @@
<color name="background_dialer_light">#cecece</color>
<!-- Background color of dialer list items (contacts, call log entries) -->
- <color name="background_dialer_list_items">#f5f5f5</color>
+ <color name="background_dialer_list_items">#eeeeee</color>
<!-- Background color of new dialpad -->
<color name="background_dialpad">#f2020709</color>
@@ -52,7 +52,7 @@
<color name="dialpad_secondary_text_color">#aaaaaa</color>
<!-- Background color of action bars -->
- <color name="actionbar_background_color">#e6e6e6</color>
+ <color name="actionbar_background_color">#ffffff</color>
<!-- Color of the 1dp divider that separates favorites -->
<color name="favorite_contacts_separator_color">#d0d0d0</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index e4e847c32..17439521b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -30,7 +30,7 @@
<dimen name="call_button_height">74dp</dimen>
<!-- Search View -->
- <dimen name="search_text_size">16sp</dimen>
+ <dimen name="search_text_size">14sp</dimen>
<!-- Call Log -->
<dimen name="call_log_call_action_size">32dip</dimen>
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index faf63cda9..04934c776 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -27,6 +27,7 @@ import android.app.FragmentTransaction;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
+import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
@@ -38,8 +39,11 @@ import android.provider.ContactsContract.Intents.UI;
import android.speech.RecognizerIntent;
import android.telephony.TelephonyManager;
import android.text.Editable;
+import android.text.Spannable;
+import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.TextWatcher;
+import android.text.style.ImageSpan;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
@@ -507,7 +511,19 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
mVoiceSearchButton.setOnClickListener(this);
mSearchView = (EditText) findViewById(R.id.search_view);
mSearchView.addTextChangedListener(mPhoneSearchQueryTextListener);
- mSearchView.setHint(getString(R.string.dialer_hint_find_contact));
+
+ final String hintText = getString(R.string.dialer_hint_find_contact);
+
+ // The following code is used to insert an icon into a CharSequence (copied from
+ // SearchView)
+ final SpannableStringBuilder ssb = new SpannableStringBuilder(" "); // for the icon
+ ssb.append(hintText);
+ final Drawable searchIcon = getResources().getDrawable(R.drawable.ic_ab_search);
+ final int textSize = (int) (mSearchView.getTextSize() * 1.20);
+ searchIcon.setBounds(0, 0, textSize, textSize);
+ ssb.setSpan(new ImageSpan(searchIcon), 1, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+
+ mSearchView.setHint(ssb);
}
final AnimatorListener mHideListener = new AnimatorListenerAdapter() {