diff options
author | calderwoodra <calderwoodra@google.com> | 2017-12-08 20:52:56 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-12-08 20:53:51 -0800 |
commit | 73b51d5771b31c932a589abc9bb0fe64c52fe102 (patch) | |
tree | 3845e7aad9e502bf5a91eb8705c8005f06990105 /java/com/android/dialer/speeddial/res | |
parent | 20ebcdca46e6be68050cd44087f0f768f5dae5c6 (diff) |
Implemented adding a new favorites contact flow NUI.
This change consists of mainly 3 things:
- Update contacts fragment to meet AddFavoriteActivity requirements
- Implement AddFavoriteActivity
- Passing the contact back to SpeedDialFragment
Bug: 36841782
Test: SpeedDialIntegrationTest
PiperOrigin-RevId: 178461265
Change-Id: Ib3a13eae311acf6ce10a94df4f2c95b9af120cff
Diffstat (limited to 'java/com/android/dialer/speeddial/res')
3 files changed, 51 insertions, 3 deletions
diff --git a/java/com/android/dialer/speeddial/res/layout/add_favorite_activity.xml b/java/com/android/dialer/speeddial/res/layout/add_favorite_activity.xml new file mode 100644 index 000000000..4df2f29b4 --- /dev/null +++ b/java/com/android/dialer/speeddial/res/layout/add_favorite_activity.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/add_favorite_container" + android:layout_width="match_parent" + android:layout_height="match_parent"/>
\ No newline at end of file diff --git a/java/com/android/dialer/speeddial/res/menu/add_favorite_menu.xml b/java/com/android/dialer/speeddial/res/menu/add_favorite_menu.xml new file mode 100644 index 000000000..b11c7f5d6 --- /dev/null +++ b/java/com/android/dialer/speeddial/res/menu/add_favorite_menu.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + <item + android:id="@+id/action_search" + android:title="@android:string/search_go" + app:showAsAction="always" + app:actionViewClass="android.support.v7.widget.SearchView"/> +</menu>
\ No newline at end of file diff --git a/java/com/android/dialer/speeddial/res/values/strings.xml b/java/com/android/dialer/speeddial/res/values/strings.xml index f814ed6d4..d64d03575 100644 --- a/java/com/android/dialer/speeddial/res/values/strings.xml +++ b/java/com/android/dialer/speeddial/res/values/strings.xml @@ -15,12 +15,15 @@ ~ limitations under the License --> <resources> - <!-- header for a list of contacts that are the users favorites. --> + <!-- header for a list of contacts that are the users favorites. [CHAR LIMIT=30] --> <string name="favorites_header">Favorites</string> - <!-- header for a list of contacts that are suggestions for the user to place calls to --> + <!-- header for a list of contacts that are suggestions for the user to place calls to. [CHAR LIMIT=30] --> <string name="suggestions_header">Suggestions</string> - <!-- text for a button that prompts the user to add a contact to their favorites --> + <!-- text for a button that prompts the user to add a contact to their favorites. [CHAR LIMIT=12] --> <string name="speed_dial_add_button_text">Add</string> + + <!-- Title for screen prompting the user to select a contact to mark as a favorite. [CHAR LIMIT=NONE] --> + <string name="add_favorite_activity_title">Add Favorite</string> </resources>
\ No newline at end of file |