summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/searchfragment
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2017-11-21 10:53:53 -0800
committerCopybara-Service <copybara-piper@google.com>2017-11-21 12:14:34 -0800
commit6d67975290cae16971dd30779ed60dba44962ecc (patch)
tree3b441b6a743fc3ba6ea0a79bf24250fc0b495984 /java/com/android/dialer/searchfragment
parentc3968e62c44530369eb2ca73bc0f7290e53bd613 (diff)
Nearby places location permission request is now in a card view.
Bug: 68272141 Test: n/a PiperOrigin-RevId: 176531675 Change-Id: Ia6cc29c4285ebe280d23a81f91007a02a65855b3
Diffstat (limited to 'java/com/android/dialer/searchfragment')
-rw-r--r--java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml100
-rw-r--r--java/com/android/dialer/searchfragment/nearbyplaces/res/values/strings.xml2
2 files changed, 57 insertions, 45 deletions
diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml b/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml
index 66a3e0c49..4373252bd 100644
--- a/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml
+++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/layout/location_permission_row.xml
@@ -14,53 +14,65 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<android.support.v7.widget.CardView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingStart="16dp"
- android:paddingEnd="16dp"
- android:paddingTop="16dp">
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginTop="8dp"
+ app:cardElevation="2dp">
- <ImageView
- android:id="@+id/permission_image"
- android:layout_width="40dp"
- android:layout_height="40dp"
- android:layout_marginEnd="16dp"
- android:src="@drawable/business_asset"/>
-
- <TextView
- android:id="@+id/permission_text"
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_toEndOf="@id/permission_image"
- android:minHeight="40dp"
- android:text="@string/search_location_permission"
- android:lineSpacingMultiplier="1.2"
- android:textSize="16sp"
- android:textColor="@color/dialer_secondary_text_color"/>
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="12dp">
+
+ <ImageView
+ android:id="@+id/permission_image"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_marginEnd="16dp"
+ android:src="@drawable/business_asset"/>
+
+ <TextView
+ android:id="@+id/permission_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toEndOf="@id/permission_image"
+ android:minHeight="40dp"
+ android:text="@string/search_location_permission"
+ android:lineSpacingMultiplier="1.2"
+ android:textSize="16sp"
+ android:textColor="@color/dialer_secondary_text_color"/>
- <Button
- android:id="@+id/location_permission_allow"
- android:layout_width="wrap_content"
- android:layout_height="52dp"
- android:layout_alignParentEnd="true"
- android:layout_below="@id/permission_text"
- android:layout_marginTop="16dp"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:text="@string/nearby_places_allow"/>
+ <Button
+ android:id="@+id/location_permission_allow"
+ android:layout_width="wrap_content"
+ android:layout_height="52dp"
+ android:layout_alignParentEnd="true"
+ android:layout_below="@id/permission_text"
+ android:layout_marginTop="18dp"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:text="@string/nearby_places_allow"/>
- <Button
- android:id="@+id/location_permission_dismiss"
- android:layout_width="wrap_content"
- android:layout_height="52dp"
- android:layout_toStartOf="@+id/location_permission_allow"
- android:layout_below="@id/permission_text"
- android:layout_marginEnd="8dp"
- android:layout_marginTop="16dp"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:text="@string/nearby_places_dismiss"
- android:textColor="@color/dialer_theme_color"
- style="@style/Widget.AppCompat.Button.Borderless"/>
-</RelativeLayout>
+ <Button
+ android:id="@+id/location_permission_dismiss"
+ android:layout_width="wrap_content"
+ android:layout_height="52dp"
+ android:layout_toStartOf="@+id/location_permission_allow"
+ android:layout_below="@id/permission_text"
+ android:layout_marginEnd="8dp"
+ android:layout_marginTop="18dp"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:text="@string/nearby_places_dismiss"
+ android:textColor="@color/dialer_theme_color"
+ style="@style/Widget.AppCompat.Button.Borderless"/>
+ </RelativeLayout>
+</android.support.v7.widget.CardView> \ No newline at end of file
diff --git a/java/com/android/dialer/searchfragment/nearbyplaces/res/values/strings.xml b/java/com/android/dialer/searchfragment/nearbyplaces/res/values/strings.xml
index 7fb38f6b2..f8f1071c9 100644
--- a/java/com/android/dialer/searchfragment/nearbyplaces/res/values/strings.xml
+++ b/java/com/android/dialer/searchfragment/nearbyplaces/res/values/strings.xml
@@ -19,7 +19,7 @@
<string name="nearby_places">Nearby places</string>
<!-- Shown as a prompt to turn on location permissions and/or enable location to allow nearby places search [CHAR LIMIT=NONE]-->
- <string name="search_location_permission">To get contact information for places near you, allow access to your location</string>
+ <string name="search_location_permission">To get contact information for places near you, allow access to your location.</string>
<!-- Text on a button asking the user to grant the location permission -->
<string name="nearby_places_allow">Allow</string>