Skip to content

Commit e60cdf1

Browse files
Adam CohenAndroid (Google) Code Review
authored andcommitted
Merge "Final keyguard tablet layout integration" into jb-mr1-dev
2 parents 9aefa14 + 71b3cd5 commit e60cdf1

File tree

28 files changed

+371
-116
lines changed

28 files changed

+371
-116
lines changed

core/res/res/layout-land/keyguard_host_view.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@
3030
<include layout="@layout/keyguard_widget_region"
3131
android:layout_width="0dp"
3232
android:layout_height="match_parent"
33-
android:layout_weight=".45" />
33+
android:layout_weight="@integer/kg_widget_region_weight" />
3434

3535
<com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
3636
android:id="@+id/view_flipper"
3737
android:layout_width="0dp"
3838
android:layout_height="match_parent"
39-
android:layout_weight="0.55"
40-
android:layout_marginLeft="8dp"
41-
android:layout_marginRight="8dp"
39+
android:layout_weight="@integer/kg_security_flipper_weight"
40+
android:clipChildren="false"
41+
android:clipToPadding="false"
42+
android:paddingLeft="@dimen/keyguard_security_view_margin"
43+
android:paddingTop="@dimen/keyguard_security_view_margin"
44+
android:paddingRight="@dimen/keyguard_security_view_margin"
45+
android:paddingBottom="@dimen/keyguard_security_view_margin"
4246
android:gravity="center">
4347

4448
<!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->

core/res/res/layout-port/keyguard_host_view.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,20 @@
2222
<com.android.internal.policy.impl.keyguard.KeyguardHostView
2323
xmlns:android="http://schemas.android.com/apk/res/android"
2424
android:id="@+id/keyguard_host_view"
25-
android:orientation="vertical"
2625
android:layout_width="match_parent"
2726
android:layout_height="match_parent"
2827
android:gravity="center_horizontal"
29-
android:clipChildren="false">
28+
android:orientation="vertical">
3029

3130
<com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
3231
android:id="@+id/view_flipper"
3332
android:layout_height="match_parent"
33+
android:clipChildren="false"
34+
android:clipToPadding="false"
35+
android:paddingLeft="@dimen/keyguard_security_view_margin"
36+
android:paddingTop="@dimen/keyguard_security_view_margin"
37+
android:paddingRight="@dimen/keyguard_security_view_margin"
38+
android:paddingBottom="@dimen/keyguard_security_view_margin"
3439
android:gravity="center">
3540

3641
<!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->

core/res/res/layout-sw600dp-land/keyguard_host_view.xml

Lines changed: 0 additions & 55 deletions
This file was deleted.

core/res/res/layout-sw600dp-port/keyguard_host_view.xml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,27 @@
2222
<com.android.internal.policy.impl.keyguard.KeyguardHostView
2323
xmlns:android="http://schemas.android.com/apk/res/android"
2424
android:id="@+id/keyguard_host_view"
25-
android:orientation="vertical"
2625
android:layout_width="match_parent"
2726
android:layout_height="match_parent"
28-
android:gravity="center_horizontal">
27+
android:gravity="center_horizontal"
28+
android:orientation="vertical">
2929

3030
<include layout="@layout/keyguard_widget_region"
3131
android:layout_width="match_parent"
3232
android:layout_height="0dip"
33-
android:layout_weight="0.4"/>
33+
android:layout_weight="@integer/kg_widget_region_weight" />
3434

3535
<com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
3636
android:id="@+id/view_flipper"
37-
android:layout_width="@dimen/kg_security_view_width"
37+
android:layout_width="match_parent"
3838
android:layout_height="0dip"
39-
android:layout_weight="0.6"
39+
android:layout_weight="@integer/kg_security_flipper_weight"
40+
android:clipChildren="false"
41+
android:clipToPadding="false"
42+
android:paddingLeft="@dimen/keyguard_security_view_margin"
43+
android:paddingTop="@dimen/keyguard_security_view_margin"
44+
android:paddingRight="@dimen/keyguard_security_view_margin"
45+
android:paddingBottom="@dimen/keyguard_security_view_margin"
4046
android:layout_gravity="center">
4147

4248
<!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
**
4+
** Copyright 2012, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License")
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
<merge xmlns:android="http://schemas.android.com/apk/res/android">
20+
<include layout="@layout/keyguard_glow_pad_view"
21+
android:layout_width="@dimen/kg_glow_pad_size"
22+
android:layout_height="@dimen/kg_glow_pad_size"
23+
android:layout_gravity="center" />
24+
</merge>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
**
4+
** Copyright 2012, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License")
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
20+
<merge xmlns:android="http://schemas.android.com/apk/res/android">
21+
<include layout="@layout/keyguard_glow_pad_view"
22+
android:layout_width="wrap_content"
23+
android:layout_height="wrap_content"
24+
android:layout_gravity="center" />
25+
</merge>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
**
4+
** Copyright 2012, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License")
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
20+
<!-- This is the selector widget that allows the user to select an action. -->
21+
<com.android.internal.widget.multiwaveview.GlowPadView
22+
xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android"
23+
xmlns:android="http://schemas.android.com/apk/res/android"
24+
android:id="@+id/glow_pad_view"
25+
android:layout_width="wrap_content"
26+
android:layout_height="wrap_content"
27+
android:layout_gravity="center"
28+
android:orientation="horizontal"
29+
android:gravity="@integer/kg_selector_gravity"
30+
android:focusable="true"
31+
32+
prvandroid:targetDrawables="@*android:array/lockscreen_targets_with_camera"
33+
prvandroid:targetDescriptions="@*android:array/lockscreen_target_descriptions_with_camera"
34+
prvandroid:directionDescriptions="@*android:array/lockscreen_direction_descriptions"
35+
prvandroid:handleDrawable="@*android:drawable/ic_lockscreen_handle"
36+
prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring"
37+
prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius"
38+
prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
39+
prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin"
40+
prvandroid:feedbackCount="1"
41+
prvandroid:vibrationDuration="20"
42+
prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
43+
prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot" />

core/res/res/layout/keyguard_selector_view.xml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,50 +24,35 @@
2424
android:id="@+id/keyguard_selector_view"
2525
android:layout_width="match_parent"
2626
android:layout_height="match_parent"
27+
android:clipChildren="false"
28+
android:clipToPadding="false"
2729
android:orientation="vertical">
2830

2931
<include layout="@layout/keyguard_widget_region"
3032
android:layout_width="match_parent"
3133
android:layout_height="0dip"
3234
android:layout_weight="0.45" />
3335

34-
<RelativeLayout
36+
<FrameLayout
3537
android:layout_width="wrap_content"
3638
android:layout_height="0dip"
3739
android:layout_weight="0.55"
3840
android:layout_gravity="center"
41+
android:clipChildren="false"
42+
android:clipToPadding="false"
3943
android:gravity="center">
4044

41-
<com.android.internal.widget.multiwaveview.GlowPadView
42-
android:id="@+id/glow_pad_view"
43-
android:orientation="horizontal"
44-
android:layout_width="wrap_content"
45-
android:layout_height="wrap_content"
46-
android:focusable="true"
47-
android:gravity="@integer/kg_selector_gravity"
48-
49-
prvandroid:targetDrawables="@*android:array/lockscreen_targets_with_camera"
50-
prvandroid:targetDescriptions="@*android:array/lockscreen_target_descriptions_with_camera"
51-
prvandroid:directionDescriptions="@*android:array/lockscreen_direction_descriptions"
52-
prvandroid:handleDrawable="@*android:drawable/ic_lockscreen_handle"
53-
prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring"
54-
prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius"
55-
prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
56-
prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin"
57-
prvandroid:feedbackCount="1"
58-
prvandroid:vibrationDuration="20"
59-
prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
60-
prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"/>
45+
<include layout="@layout/keyguard_glow_pad_container" />
6146

6247
<include layout="@layout/keyguard_emergency_carrier_area"
6348
android:id="@+id/keyguard_selector_fade_container"
6449
android:layout_width="match_parent"
6550
android:layout_height="wrap_content"
6651
android:orientation="vertical"
67-
android:gravity="center_horizontal"
68-
android:layout_alignParentBottom="true" />
52+
android:layout_gravity="bottom|center_horizontal"
53+
android:gravity="center_horizontal" />
6954

70-
</RelativeLayout>
55+
</FrameLayout>
7156

7257
</com.android.internal.policy.impl.keyguard.KeyguardSelectorView>
7358

core/res/res/layout/keyguard_status_view.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
android:orientation="vertical"
3030
android:layout_width="match_parent"
3131
android:layout_height="match_parent"
32-
android:gravity="center_horizontal"
32+
android:gravity="center_horizontal|top"
3333
android:contentDescription="@string/keyguard_accessibility_status">
3434

3535
<com.android.internal.policy.impl.keyguard.ClockView
3636
android:id="@+id/clock_view"
3737
android:layout_width="wrap_content"
3838
android:layout_height="wrap_content"
39-
android:layout_marginTop="-15.5dip"
39+
android:layout_marginTop="@dimen/kg_clock_top_margin"
4040
android:layout_marginEnd="@dimen/kg_status_line_font_right_margin"
4141
android:layout_gravity="end">
4242

core/res/res/values-land/integers.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
*/
1818
-->
1919
<resources>
20-
<integer name="kg_security_flip_duration">150</integer>
21-
<integer name="kg_security_fade_duration">150</integer>
22-
2320
<!-- Gravity to make KeyguardSelectorView work in multiple orientations
2421
0x13 == "left|center_vertical" -->
2522
<integer name="kg_selector_gravity">0x13</integer>
23+
<integer name="kg_widget_region_weight">45</integer>
24+
<integer name="kg_security_flipper_weight">55</integer>
2625
</resources>

0 commit comments

Comments
 (0)