diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-22 20:48:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-22 20:48:36 +0000 |
commit | 494552349aefe18dd3dea0dd656d5cd48f813e64 (patch) | |
tree | 5999cb62049453a685260d636bade06d591df5f8 /java/com/android/dialer/dialpadview/res | |
parent | b3772ecffe9901d9a55c3f3284cc652057b43f8b (diff) | |
parent | 9c9175fc3cf874d7b1e8f6334b8ba709a9e3a310 (diff) |
Merge "Show IMEI/MEID in hex, dec, and barcode when appropriate"
Diffstat (limited to 'java/com/android/dialer/dialpadview/res')
5 files changed, 88 insertions, 0 deletions
diff --git a/java/com/android/dialer/dialpadview/res/layout/dialog_deviceids.xml b/java/com/android/dialer/dialpadview/res/layout/dialog_deviceids.xml new file mode 100644 index 000000000..89e256bde --- /dev/null +++ b/java/com/android/dialer/dialpadview/res/layout/dialog_deviceids.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 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. +--> +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <LinearLayout + android:id="@+id/deviceids_holder" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="?dialogPreferredPadding" + android:paddingEnd="?dialogPreferredPadding" + android:orientation="vertical"/> +</ScrollView> diff --git a/java/com/android/dialer/dialpadview/res/layout/row_deviceid.xml b/java/com/android/dialer/dialpadview/res/layout/row_deviceid.xml new file mode 100644 index 000000000..53f3e5d0d --- /dev/null +++ b/java/com/android/dialer/dialpadview/res/layout/row_deviceid.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 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. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="?dialogPreferredPadding" + android:orientation="vertical"> + <TextView + style="@style/DeviceIdBody" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/hex"/> + <TextView + android:id="@+id/deviceid_hex" + style="@style/DeviceIdBody" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + <TextView + android:id="@+id/deviceid_dec_label" + style="@style/DeviceIdBody" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/dec" + android:visibility="gone"/> + <TextView + android:id="@+id/deviceid_dec" + style="@style/DeviceIdBody" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + <ImageView + android:id="@+id/deviceid_barcode" + android:layout_width="match_parent" + android:layout_height="@dimen/barcode_height" + android:layout_margin="24dp" + android:layout_gravity="center_horizontal"/> +</LinearLayout> diff --git a/java/com/android/dialer/dialpadview/res/values/dimens.xml b/java/com/android/dialer/dialpadview/res/values/dimens.xml index 4b386eeb5..6892fcf30 100644 --- a/java/com/android/dialer/dialpadview/res/values/dimens.xml +++ b/java/com/android/dialer/dialpadview/res/values/dimens.xml @@ -43,4 +43,6 @@ <!-- Length of dialpad's shadows in dialer. --> <dimen name="shadow_length">10dp</dimen> + + <dimen name="barcode_height">100dp</dimen> </resources> diff --git a/java/com/android/dialer/dialpadview/res/values/strings.xml b/java/com/android/dialer/dialpadview/res/values/strings.xml index 094ca6b8f..51367b644 100644 --- a/java/com/android/dialer/dialpadview/res/values/strings.xml +++ b/java/com/android/dialer/dialpadview/res/values/strings.xml @@ -77,6 +77,12 @@ <!-- The title of a dialog that displays the MEID of the CDMA phone --> <string name="meid">MEID</string> + <!-- The label for the hex encoding of the device ID --> + <string name="hex" translatable="false">HEX:</string> + + <!-- The label for the decimal encoding of the device ID --> + <string name="dec" translatable="false">DEC:</string> + <!-- Dialog text displayed when loading a phone number from the SIM card for speed dial --> <string name="simContacts_emptyLoading">Loading from SIM card\u2026</string> diff --git a/java/com/android/dialer/dialpadview/res/values/styles.xml b/java/com/android/dialer/dialpadview/res/values/styles.xml index d69e6a832..75a54a305 100644 --- a/java/com/android/dialer/dialpadview/res/values/styles.xml +++ b/java/com/android/dialer/dialpadview/res/values/styles.xml @@ -116,4 +116,9 @@ <item name="dialpad_voicemail_tint">?attr/dialpad_text_color_secondary</item> <item name="dialpad_background">#00000000</item> </style> + + <style name="DeviceIdBody"> + <item name="android:textColor">?android:textColorPrimary</item> + <item name="android:textSize">16sp</item> + </style> </resources> |