Skip to content

Commit c9a0d7d

Browse files
author
Peter Ng
committed
Lockscreen on tablet is now using the same waveview widget as phone
Bug: 5514500 Change-Id: Id84cd3515c3395297c8f9962f7985fd548634720
1 parent e49cf10 commit c9a0d7d

File tree

9 files changed

+109
-7
lines changed

9 files changed

+109
-7
lines changed
13 KB
Loading
15.2 KB
Loading
6.62 KB
Loading
7.96 KB
Loading
21.3 KB
Loading
24.9 KB
Loading

core/res/res/layout-sw600dp/keyguard_screen_tab_unlock.xml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,27 @@
5757
android:drawablePadding="4dip"
5858
/>
5959

60-
<com.android.internal.widget.WaveView
60+
<com.android.internal.widget.multiwaveview.MultiWaveView
6161
android:id="@+id/unlock_widget"
62-
android:layout_width="wrap_content"
63-
android:layout_height="wrap_content"
62+
android:orientation="horizontal"
63+
android:layout_width="match_parent"
64+
android:layout_height="match_parent"
65+
android:layout_alignParentBottom="true"
6466
android:layout_gravity="center"
67+
68+
android:targetDrawables="@array/lockscreen_targets_with_camera"
69+
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
70+
android:directionDescriptions="@array/lockscreen_direction_descriptions"
71+
android:handleDrawable="@drawable/ic_lockscreen_handle"
72+
android:waveDrawable="@drawable/ic_lockscreen_outerring"
73+
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
74+
android:snapMargin="@dimen/multiwaveview_snap_margin"
75+
android:hitRadius="@dimen/multiwaveview_hit_radius"
76+
android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right"
77+
android:horizontalOffset="0dip"
78+
android:verticalOffset="60dip"
79+
android:feedbackCount="3"
80+
android:vibrationDuration="20"
6581
/>
6682

6783
<!-- emergency call button shown when sim is PUKd and tab_selector is hidden -->

core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,27 @@
6161
android:layout_alignParentTop="true"
6262
android:drawablePadding="4dip"/>
6363

64-
<com.android.internal.widget.WaveView
64+
<com.android.internal.widget.multiwaveview.MultiWaveView
6565
android:id="@+id/unlock_widget"
66-
android:layout_width="wrap_content"
66+
android:layout_width="match_parent"
6767
android:layout_height="match_parent"
68+
android:layout_rowSpan="7"
6869
android:layout_gravity="center_vertical|center_horizontal"
69-
android:layout_marginRight="0dip"
70-
android:layout_weight="1.0"/>
70+
71+
android:targetDrawables="@array/lockscreen_targets_with_camera"
72+
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
73+
android:directionDescriptions="@array/lockscreen_direction_descriptions"
74+
android:handleDrawable="@drawable/ic_lockscreen_handle"
75+
android:waveDrawable="@drawable/ic_lockscreen_outerring"
76+
android:outerRadius="@dimen/multiwaveview_target_placement_radius"
77+
android:snapMargin="@dimen/multiwaveview_snap_margin"
78+
android:hitRadius="@dimen/multiwaveview_hit_radius"
79+
android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right"
80+
android:feedbackCount="3"
81+
android:vibrationDuration="20"
82+
android:horizontalOffset="0dip"
83+
android:verticalOffset="0dip"
84+
/>
7185

7286
<!-- emergency call button shown when sim is PUKd and tab_selector is hidden -->
7387
<Button
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/* //device/apps/common/assets/res/any/colors.xml
4+
**
5+
** Copyright 2006, The Android Open Source Project
6+
**
7+
** Licensed under the Apache License, Version 2.0 (the "License");
8+
** you may not use this file except in compliance with the License.
9+
** You may obtain a copy of the License at
10+
**
11+
** http://www.apache.org/licenses/LICENSE-2.0
12+
**
13+
** Unless required by applicable law or agreed to in writing, software
14+
** distributed under the License is distributed on an "AS IS" BASIS,
15+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
** See the License for the specific language governing permissions and
17+
** limitations under the License.
18+
*/
19+
-->
20+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
21+
22+
<!-- Resources for MultiWaveView in LockScreen -->
23+
<array name="lockscreen_targets_when_silent">
24+
<item>@drawable/ic_lockscreen_unlock</item>
25+
<item>@null</item>
26+
<item>@drawable/ic_lockscreen_soundon</item>
27+
<item>@null</item>
28+
</array>
29+
30+
<array name="lockscreen_target_descriptions_when_silent">
31+
<item>@string/description_target_unlock</item>
32+
<item>@null</item>
33+
<item>@string/description_target_soundon</item>
34+
<item>@null</item>
35+
</array>
36+
37+
<array name="lockscreen_direction_descriptions">
38+
<item>@string/description_direction_right</item>
39+
<item>@null</item>
40+
<item>@string/description_direction_left</item>
41+
<item>@null</item>
42+
</array>
43+
44+
<array name="lockscreen_targets_when_soundon">
45+
<item>@drawable/ic_lockscreen_unlock</item>
46+
<item>@null</item>
47+
<item>@drawable/ic_lockscreen_silent</item>
48+
<item>@null</item>
49+
</array>
50+
51+
<array name="lockscreen_target_descriptions_when_soundon">
52+
<item>@string/description_target_unlock</item>
53+
<item>@null</item>
54+
<item>@string/description_target_silent</item>
55+
<item>@null</item>
56+
</array>
57+
58+
<array name="lockscreen_targets_with_camera">
59+
<item>@drawable/ic_lockscreen_unlock</item>
60+
<item>@null</item>
61+
<item>@drawable/ic_lockscreen_camera</item>
62+
<item>@null</item>
63+
</array>
64+
65+
<array name="lockscreen_target_descriptions_with_camera">
66+
<item>@string/description_target_unlock</item>
67+
<item>@null</item>
68+
<item>@string/description_target_camera</item>
69+
<item>@null</item>
70+
</array>
71+
72+
</resources>

0 commit comments

Comments
 (0)