Merge "Move car keyguard values to CarSystemUI"

This commit is contained in:
TreeHugger Robot
2018-12-19 19:44:00 +00:00
committed by Android (Google) Code Review
19 changed files with 953 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ android_app {
],
},
resource_dirs: [
"res-keyguard",
"res",
],

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59L17.59,17L14,13.41L10.41,17L9,15.59zM21,6H8l-4.5,6L8,18h13V6M21,4c1.1,0 2,0.9 2,2v12c0,1.1 -0.9,2 -2,2H8c-0.63,0 -1.22,-0.3 -1.6,-0.8L1,12l5.4,-7.2C6.78,4.3 7.37,4 8,4H21L21,4z"/>
</vector>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M9,16.2l-3.5,-3.5a0.984,0.984 0,0 0,-1.4 0,0.984 0.984,0 0,0 0,1.4l4.19,4.19c0.39,0.39 1.02,0.39 1.41,0L20.3,7.7a0.984,0.984 0,0 0,0 -1.4,0.984 0.984,0 0,0 -1.4,0L9,16.2z"/>
</vector>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/car_button_radius"/>
<solid android:color="#131315"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:radius="@dimen/car_button_radius"/>
<solid android:color="@color/button_background"/>
</shape>
</item>
</selector>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->
<!-- Car customizations
- Added title "Enter your Pattern" at the top
- Hid the emergency call at the bottom
-->
<com.android.keyguard.KeyguardPatternView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyguard_pattern_view"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="@dimen/car_margin">
<FrameLayout
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_weight="1">
<com.android.internal.widget.LockPatternView
android:id="@+id/lockPatternView"
android:layout_width="@dimen/keyguard_pattern_dimension"
android:layout_height="@dimen/keyguard_pattern_dimension"
android:layout_gravity="center"/>
</FrameLayout>
<LinearLayout
android:id="@+id/container"
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center_vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/car_padding_2"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="@dimen/car_body1_size"
android:text="@string/keyguard_enter_your_pattern" />
<include layout="@layout/keyguard_message_area" />
<Button
android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/KeyguardButton"
android:text="@string/cancel"/>
<include layout="@layout/keyguard_eca"
android:id="@+id/keyguard_selector_fade_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="bottom|center_horizontal"
android:gravity="center_horizontal"
android:visibility="gone" />
</LinearLayout>
</com.android.keyguard.KeyguardPatternView>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<!-- Car customizations
- Added title "Enter your PIN" under the entry field
- Put backspace and enter buttons in row 4
- PIN pad is on start side while entry field and title are on the end side
- Hid the emergency call at the bottom
-->
<com.android.keyguard.KeyguardPINView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyguard_pin_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingHorizontal="@dimen/car_margin">
<FrameLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent">
<GridLayout
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:columnCount="3">
<include layout="@layout/num_pad_keys"/>
</GridLayout>
</FrameLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<com.android.keyguard.PasswordTextView
android:id="@+id/pinEntry"
android:layout_width="@dimen/keyguard_security_width"
android:layout_height="@dimen/pin_entry_height"
android:gravity="center"
app:scaledTextSize="@integer/password_text_view_scale"
android:contentDescription="@string/keyguard_accessibility_pin_area" />
<View
android:id="@+id/divider"
android:layout_width="@dimen/keyguard_security_width"
android:layout_height="@dimen/divider_height"
android:background="@android:color/white" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/car_padding_2"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="@dimen/car_body1_size"
android:text="@string/keyguard_enter_your_pin" />
<include layout="@layout/keyguard_message_area" />
<Button
android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/KeyguardButton"
android:text="@string/cancel"/>
</LinearLayout>
<!-- KeyguardPinView references these resources ids in code so removing them will cause the
keyguard to crash. Instead put them down here where they are out of the way and set their
visibility to gone. -->
<com.android.keyguard.AlphaOptimizedRelativeLayout
android:id="@+id/row0"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row1"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row2"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row3"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row4"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<include layout="@layout/keyguard_eca"
android:id="@+id/keyguard_selector_fade_container"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
</com.android.keyguard.KeyguardPINView>

View File

@@ -0,0 +1,32 @@
<?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
-->
<!-- Car customizations
Car has solid black background instead of a transparent one
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:fitsSystemWindows="true">
<include
style="@style/BouncerSecurityContainer"
layout="@layout/keyguard_host_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</FrameLayout>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->
<com.android.keyguard.KeyguardMessageArea
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
style="@style/Keyguard.TextView"
android:id="@+id/keyguard_message_area"
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:layout_marginBottom="@dimen/car_padding_4"
android:textSize="@dimen/car_body2_size" />

View File

@@ -0,0 +1,37 @@
<?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
-->
<!-- Car customizations
The mnemonics is not shown for car but KeyguardPinView references the resource id in code.
Removing it will cause the keyguard to crash. Hide them instead
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<TextView
android:id="@+id/digit_text"
style="@style/Widget.TextView.NumPadKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<!-- The mnemonics is not shown for car but KeyguardPinView references the resource id in code.
Removing it will cause the keyguard to crash. Hide them instead -->
<TextView
android:id="@+id/klondike_text"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone"
/>
</merge>

View File

@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->
<!-- Car customizations
- Added title "Enter your Password" below the password field
- Hid the emergency call at the bottom
-->
<com.android.keyguard.KeyguardPasswordView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyguard_password_view"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
androidprv:layout_maxWidth="@dimen/keyguard_security_width"
androidprv:layout_maxHeight="@dimen/keyguard_security_height"
android:gravity="center">
<include layout="@layout/keyguard_message_area" />
<!-- Password entry field -->
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:theme="?attr/passwordStyle">
<EditText
android:id="@+id/passwordEntry"
android:layout_width="@dimen/password_field_width"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:singleLine="true"
android:textStyle="normal"
android:inputType="textPassword"
android:textSize="@dimen/car_body1_size"
android:textColor="?attr/wallpaperTextColor"
android:textAppearance="?android:attr/textAppearanceMedium"
android:imeOptions="flagForceAscii|actionDone"
android:maxLength="@integer/password_text_view_scale"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/car_padding_2"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="@dimen/car_body1_size"
android:text="@string/keyguard_enter_your_password" />
<Button
android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/KeyguardButton"
android:text="@string/cancel"/>
<ImageView android:id="@+id/switch_ime_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:src="@drawable/ic_lockscreen_ime"
android:contentDescription="@string/accessibility_ime_switch_button"
android:clickable="true"
android:padding="8dp"
android:tint="@color/background_protected"
android:layout_gravity="end|center_vertical"
android:background="?android:attr/selectableItemBackground"
android:visibility="gone"
/>
</LinearLayout>
<include layout="@layout/keyguard_eca"
android:id="@+id/keyguard_selector_fade_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:orientation="vertical"
android:layout_gravity="bottom|center_horizontal"
android:gravity="center_horizontal"
android:visibility="gone"
/>
</com.android.keyguard.KeyguardPasswordView>

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 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.
*/
-->
<!-- Car customizations
- Added title "Enter your Pattern" at the top
- Hid the emergency call at the bottom
-->
<com.android.keyguard.KeyguardPatternView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyguard_pattern_view"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
androidprv:layout_maxWidth="@dimen/keyguard_security_width"
android:gravity="center_horizontal">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/container"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_gravity="center">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/car_padding_2"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="@dimen/car_body1_size"
android:text="@string/keyguard_enter_your_pattern" />
<include layout="@layout/keyguard_message_area" />
<com.android.internal.widget.LockPatternView
android:id="@+id/lockPatternView"
android:layout_width="@dimen/keyguard_pattern_dimension"
android:layout_height="@dimen/keyguard_pattern_dimension"
android:layout_marginVertical="@dimen/pin_pattern_pad_margin_vertical"
android:layout_gravity="center_horizontal"
android:gravity="center" />
<Button
android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/KeyguardButton"
android:text="@string/cancel"/>
<include layout="@layout/keyguard_eca"
android:id="@+id/keyguard_selector_fade_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="bottom|center_horizontal"
android:gravity="center_horizontal"
android:visibility="gone" />
</LinearLayout>
</FrameLayout>
</com.android.keyguard.KeyguardPatternView>

View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<!-- Car customizations
- Added title "Enter your PIN" under the entry field
- Put backspace and enter buttons in row 4
- Hid the emergency call at the bottom
-->
<com.android.keyguard.KeyguardPINView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyguard_pin_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/num_pad_margin_left"
android:layout_marginRight="@dimen/num_pad_margin_right"
android:orientation="vertical"
android:gravity="center">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<com.android.keyguard.PasswordTextView
android:id="@+id/pinEntry"
android:layout_width="@dimen/keyguard_security_width"
android:layout_height="@dimen/pin_entry_height"
android:gravity="center"
app:scaledTextSize="@integer/password_text_view_scale"
android:contentDescription="@string/keyguard_accessibility_pin_area" />
<View
android:id="@+id/divider"
android:layout_width="@dimen/keyguard_security_width"
android:layout_height="@dimen/divider_height"
android:background="@android:color/white" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/car_padding_2"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="@dimen/car_body1_size"
android:text="@string/keyguard_enter_your_pin" />
<include layout="@layout/keyguard_message_area" />
</LinearLayout>
<GridLayout
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="@dimen/pin_pattern_pad_margin_vertical"
android:columnCount="3">
<include layout="@layout/num_pad_keys"/>
</GridLayout>
<Button
android:id="@+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/KeyguardButton"
android:text="@string/cancel"/>
</LinearLayout>
<!-- KeyguardPinView references these resources ids in code so removing them will cause the
keyguard to crash. Instead put them down here where they are out of the way and set their
visibility to gone. -->
<com.android.keyguard.AlphaOptimizedRelativeLayout
android:id="@+id/row0"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row1"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row2"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row3"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<LinearLayout
android:id="@+id/row4"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
<include
layout="@layout/keyguard_eca"
android:id="@+id/keyguard_selector_fade_container"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="gone" />
</com.android.keyguard.KeyguardPINView>

View File

@@ -0,0 +1,83 @@
<?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
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- Row 1 -->
<com.android.keyguard.NumPadKey
android:id="@+id/key1"
style="@style/NumPadKeyButton"
app:digit="1" />
<com.android.keyguard.NumPadKey
android:id="@+id/key2"
style="@style/NumPadKeyButton.MiddleColumn"
app:digit="2" />
<com.android.keyguard.NumPadKey
android:id="@+id/key3"
style="@style/NumPadKeyButton"
app:digit="3" />
<!-- Row 2 -->
<com.android.keyguard.NumPadKey
android:id="@+id/key4"
style="@style/NumPadKeyButton"
app:digit="4" />
<com.android.keyguard.NumPadKey
android:id="@+id/key5"
style="@style/NumPadKeyButton.MiddleColumn"
app:digit="5" />
<com.android.keyguard.NumPadKey
android:id="@+id/key6"
style="@style/NumPadKeyButton"
app:digit="6" />
<!-- Row 3 -->
<com.android.keyguard.NumPadKey
android:id="@+id/key7"
style="@style/NumPadKeyButton"
app:digit="7" />
<com.android.keyguard.NumPadKey
android:id="@+id/key8"
style="@style/NumPadKeyButton.MiddleColumn"
app:digit="8" />
<com.android.keyguard.NumPadKey
android:id="@+id/key9"
style="@style/NumPadKeyButton"
app:digit="9" />
<!-- Row 4 -->
<ImageButton
android:id="@+id/delete_button"
style="@style/NumPadKeyButton.LastRow"
android:gravity="center_vertical"
android:src="@drawable/ic_backspace"
android:clickable="true"
android:tint="@android:color/white"
android:background="@drawable/ripple_drawable"
android:contentDescription="@string/keyboardview_keycode_delete" />
<com.android.keyguard.NumPadKey
android:id="@+id/key0"
style="@style/NumPadKeyButton.LastRow.MiddleColumn"
app:digit="0" />
<ImageButton
android:id="@+id/key_enter"
style="@style/NumPadKeyButton.LastRow"
android:src="@drawable/ic_done"
android:tint="@android:color/white"
android:background="@drawable/ripple_drawable"
android:contentDescription="@string/keyboardview_keycode_enter" />
</merge>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<resources>
<dimen name="pin_pattern_pad_margin_vertical">178dp</dimen>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<resources>
<dimen name="num_pad_key_margin_horizontal">@dimen/car_padding_5</dimen>
<dimen name="num_pad_key_margin_bottom">@dimen/car_padding_4</dimen>
</resources>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<resources>
<color name="button_background">@color/car_dark_blue_grey_600</color>
<color name="button_text">@color/car_action1_light</color>
</resources>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<resources>
<dimen name="num_pad_margin_left">112dp</dimen>
<dimen name="num_pad_margin_right">144dp</dimen>
<dimen name="num_pad_key_width">80dp</dimen>
<dimen name="num_pad_key_height">80dp</dimen>
<dimen name="num_pad_key_margin_horizontal">@dimen/car_padding_6</dimen>
<dimen name="num_pad_key_margin_bottom">@dimen/car_padding_5</dimen>
<dimen name="pin_entry_height">@dimen/num_pad_key_height</dimen>
<dimen name="divider_height">1dp</dimen>
<dimen name="key_enter_margin_top">128dp</dimen>
<dimen name="keyguard_pattern_dimension">400dp</dimen>
<dimen name="password_field_width">350dp</dimen>
<dimen name="pin_pattern_pad_margin_vertical">0dp</dimen>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<resources>
<integer name="password_text_view_scale">40</integer>
<integer name="password_max_length">500</integer>
</resources>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 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.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The style for the volume icons in the volume dialog. This style makes the icon scale to
fit its container since auto wants the icon to be larger. The padding is added to make it
so the icon does not press along the edges of the dialog. -->
<style name="NumPadKeyButton">
<item name="android:layout_width">@dimen/num_pad_key_width</item>
<item name="android:layout_height">@dimen/num_pad_key_height</item>
<item name="android:layout_marginBottom">@dimen/num_pad_key_margin_bottom</item>
<item name="textView">@id/pinEntry</item>
</style>
<style name="NumPadKeyButton.MiddleColumn">
<item name="android:layout_marginStart">@dimen/num_pad_key_margin_horizontal</item>
<item name="android:layout_marginEnd">@dimen/num_pad_key_margin_horizontal</item>
</style>
<style name="NumPadKeyButton.LastRow">
<item name="android:layout_marginBottom">0dp</item>
</style>
<style name="NumPadKeyButton.LastRow.MiddleColumn">
<item name="android:layout_marginStart">@dimen/num_pad_key_margin_horizontal</item>
<item name="android:layout_marginEnd">@dimen/num_pad_key_margin_horizontal</item>
</style>
<style name="KeyguardButton" parent="Widget.Car.Button">
<item name="android:background">@drawable/keyguard_button_background</item>
<item name="android:textColor">@color/button_text</item>
<item name="android:textAllCaps">false</item>
</style>
<style name="Widget.TextView.NumPadKey" parent="@android:style/Widget.TextView">
<!-- Only replaces the text size. -->
<item name="android:textSize">@dimen/car_body1_size</item>
</style>
</resources>