diff options
Diffstat (limited to 'java/com/android/incallui/calllocation/impl/res')
4 files changed, 183 insertions, 0 deletions
diff --git a/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml b/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml new file mode 100644 index 000000000..a6bd07542 --- /dev/null +++ b/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- +~ Copyright (C) 2015 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 +--> + +<ViewAnimator xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/location_view_animator" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_marginBottom="16dp" + android:background="@android:color/white" + android:elevation="2dp" + android:inAnimation="@android:anim/fade_in" + android:measureAllChildren="true" + android:outAnimation="@android:anim/fade_out"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/location_loading_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:orientation="vertical"> + + <ProgressBar + android:id="@+id/location_loading_spinner" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="28dp" + android:layout_marginBottom="12dp" + android:layout_gravity="center_horizontal"/> + + <TextView + android:id="@+id/location_loading_text" + style="@style/LocationLoadingTextStyle" + android:layout_width="match_parent" + android:layout_height="24sp" + android:layout_marginBottom="20dp" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp" + android:gravity="center" + android:text="@string/location_loading"/> + + </LinearLayout> + + <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/location_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:columnCount="2" + android:orientation="horizontal"> + + <TextView + android:id="@+id/location_address_title" + style="@style/LocationAddressTitleTextStyle" + android:layout_width="0dp" + android:layout_height="20sp" + android:layout_marginTop="16dp" + android:layout_marginBottom="4dp" + android:layout_marginStart="16dp" + android:layout_columnWeight="1" + android:text="@string/location_title"/> + + <ImageView + android:id="@+id/location_map" + android:layout_width="@dimen/location_map_width" + android:layout_height="@dimen/location_map_height" + android:layout_margin="16dp" + android:layout_gravity="end|center_vertical" + android:layout_rowSpan="4" + android:contentDescription="@string/location_map_description" + android:scaleType="centerCrop" + android:visibility="invisible" + tools:src="?android:colorPrimaryDark" + tools:visibility="visible"/> + + <TextView + android:id="@+id/address_line_one" + style="@style/LocationAddressTextStyle" + android:layout_width="0dp" + android:layout_height="24sp" + android:layout_marginStart="16dp" + android:layout_columnWeight="1" + android:ellipsize="end" + android:lines="1" + android:visibility="invisible" + tools:text="1600 Amphitheatre Pkwy And a bit" + tools:visibility="visible"/> + + <TextView + android:id="@+id/address_line_two" + style="@style/LocationAddressTextStyle" + android:layout_width="0dp" + android:layout_height="24sp" + android:layout_marginStart="16dp" + android:layout_columnWeight="1" + android:ellipsize="end" + android:lines="1" + android:visibility="invisible" + tools:text="Mountain View, CA 94043" + tools:visibility="visible"/> + + <TextView + android:id="@+id/lat_long_line" + style="@style/LocationLatLongTextStyle" + android:layout_width="0dp" + android:layout_height="24sp" + android:layout_marginBottom="12dp" + android:layout_marginStart="16dp" + android:layout_columnWeight="1" + android:ellipsize="end" + android:lines="1" + android:visibility="invisible" + tools:text="Lat: 37.421719, Long: -122.085297" + tools:visibility="visible"/> + + </GridLayout> + +</ViewAnimator> diff --git a/java/com/android/incallui/calllocation/impl/res/values/dimens.xml b/java/com/android/incallui/calllocation/impl/res/values/dimens.xml new file mode 100644 index 000000000..1f4181607 --- /dev/null +++ b/java/com/android/incallui/calllocation/impl/res/values/dimens.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2014 Google Inc. All Rights Reserved. --> +<resources> + <dimen name="location_map_width">92dp</dimen> + <dimen name="location_map_height">92dp</dimen> +</resources> diff --git a/java/com/android/incallui/calllocation/impl/res/values/strings.xml b/java/com/android/incallui/calllocation/impl/res/values/strings.xml new file mode 100644 index 000000000..ef7c1624c --- /dev/null +++ b/java/com/android/incallui/calllocation/impl/res/values/strings.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Description for location map shown during emergency calls. [CHAR LIMIT=NONE] --> + <string name="location_map_description">Emergency Location Map</string> + + <!-- Label for the address and map shown during emergency calls. [CHAR LIMIT=20] --> + <string name="location_title">You are here</string> + + <string name="lat_long_format"><xliff:g id="latitude">%f</xliff:g>, <xliff:g id="longitude">%f</xliff:g></string> + + <!-- Progress indicator loading text. [CHAR LIMIT=20] --> + <string name="location_loading">Finding your location</string> + +</resources> diff --git a/java/com/android/incallui/calllocation/impl/res/values/styles.xml b/java/com/android/incallui/calllocation/impl/res/values/styles.xml new file mode 100644 index 000000000..866a4edb6 --- /dev/null +++ b/java/com/android/incallui/calllocation/impl/res/values/styles.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2015 Google Inc. All Rights Reserved. --> +<resources> + + <style name="LocationAddressTitleTextStyle"> + <item name="android:textSize">14sp</item> + <item name="android:textColor">#dd000000</item> + <item name="android:fontFamily">sans-serif-medium</item> + </style> + + <style name="LocationAddressTextStyle"> + <item name="android:textSize">16sp</item> + <item name="android:textColor">#dd000000</item> + <item name="android:fontFamily">sans-serif</item> + </style> + + <style name="LocationLatLongTextStyle"> + <item name="android:textSize">14sp</item> + <item name="android:textColor">#88000000</item> + <item name="android:fontFamily">sans-serif</item> + </style> + + <style name="LocationLoadingTextStyle"> + <item name="android:textSize">14sp</item> + <item name="android:textColor">#dd000000</item> + <item name="android:fontFamily">sans-serif</item> + </style> +</resources> |