diff options
author | Jim Miller <jaggies@google.com> | 2012-10-10 19:02:40 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2012-10-10 19:02:40 -0700 |
commit | 71b3cd56a618e66a407081ee46bf3f64bd0e9582 (patch) | |
tree | a40dae32ff7c35b635ee5a9b7b6c3519ecca6457 | |
parent | fa5bc081593891959c143e0de9e59dd076a47b42 (diff) | |
download | frameworks_base-71b3cd56a618e66a407081ee46bf3f64bd0e9582.zip frameworks_base-71b3cd56a618e66a407081ee46bf3f64bd0e9582.tar.gz frameworks_base-71b3cd56a618e66a407081ee46bf3f64bd0e9582.tar.bz2 |
Final keyguard tablet layout integration
This change integrates the finalized tablet layouts for keyguard. It supports
both 7" and 10" tablets and makes some minor tweaks on phones.
Bug 7094419
Change-Id: I7b683382974de509e8045210544ea959db82e72d
28 files changed, 371 insertions, 116 deletions
diff --git a/core/res/res/layout-land/keyguard_host_view.xml b/core/res/res/layout-land/keyguard_host_view.xml index 10034de..6003b42 100644 --- a/core/res/res/layout-land/keyguard_host_view.xml +++ b/core/res/res/layout-land/keyguard_host_view.xml @@ -30,15 +30,19 @@ <include layout="@layout/keyguard_widget_region" android:layout_width="0dp" android:layout_height="match_parent" - android:layout_weight=".45" /> + android:layout_weight="@integer/kg_widget_region_weight" /> <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper android:id="@+id/view_flipper" android:layout_width="0dp" android:layout_height="match_parent" - android:layout_weight="0.55" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" + android:layout_weight="@integer/kg_security_flipper_weight" + android:clipChildren="false" + android:clipToPadding="false" + android:paddingLeft="@dimen/keyguard_security_view_margin" + android:paddingTop="@dimen/keyguard_security_view_margin" + android:paddingRight="@dimen/keyguard_security_view_margin" + android:paddingBottom="@dimen/keyguard_security_view_margin" android:gravity="center"> <!-- SelectorView is always used, so add it here. The rest are loaded dynamically --> diff --git a/core/res/res/layout-port/keyguard_host_view.xml b/core/res/res/layout-port/keyguard_host_view.xml index 55c4c0d..58e108c 100644 --- a/core/res/res/layout-port/keyguard_host_view.xml +++ b/core/res/res/layout-port/keyguard_host_view.xml @@ -22,15 +22,20 @@ <com.android.internal.policy.impl.keyguard.KeyguardHostView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyguard_host_view" - android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" - android:clipChildren="false"> + android:orientation="vertical"> <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper android:id="@+id/view_flipper" android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false" + android:paddingLeft="@dimen/keyguard_security_view_margin" + android:paddingTop="@dimen/keyguard_security_view_margin" + android:paddingRight="@dimen/keyguard_security_view_margin" + android:paddingBottom="@dimen/keyguard_security_view_margin" android:gravity="center"> <!-- SelectorView is always used, so add it here. The rest are loaded dynamically --> diff --git a/core/res/res/layout-sw600dp-land/keyguard_host_view.xml b/core/res/res/layout-sw600dp-land/keyguard_host_view.xml deleted file mode 100644 index 595c918..0000000 --- a/core/res/res/layout-sw600dp-land/keyguard_host_view.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -** -** Copyright 2012, 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. -*/ ---> - -<!-- This is the host view that generally contains two sub views: the widget view - and the security view. --> -<com.android.internal.policy.impl.keyguard.KeyguardHostView - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/keyguard_host_view" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="horizontal"> - - <include layout="@layout/keyguard_widget_region" - android:layout_width="0dip" - android:layout_height="match_parent" - android:layout_weight="1"/> - - <FrameLayout - android:layout_width="0dip" - android:layout_height="match_parent" - android:layout_weight="1" - android:gravity="center"> - - <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper - android:id="@+id/view_flipper" - android:layout_width="@dimen/kg_security_view_width" - android:layout_height="match_parent" - android:layout_gravity="center" - android:layout_weight="1" - android:gravity="center"> - - <!-- SelectorView is always used, so add it here. The rest are loaded dynamically --> - <include layout="@layout/keyguard_selector_view"/> - - </com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper> - - </FrameLayout> - -</com.android.internal.policy.impl.keyguard.KeyguardHostView> diff --git a/core/res/res/layout-sw600dp-port/keyguard_host_view.xml b/core/res/res/layout-sw600dp-port/keyguard_host_view.xml index 7cde7e1..a3e9b59 100644 --- a/core/res/res/layout-sw600dp-port/keyguard_host_view.xml +++ b/core/res/res/layout-sw600dp-port/keyguard_host_view.xml @@ -22,21 +22,27 @@ <com.android.internal.policy.impl.keyguard.KeyguardHostView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyguard_host_view" - android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:gravity="center_horizontal"> + android:gravity="center_horizontal" + android:orientation="vertical"> <include layout="@layout/keyguard_widget_region" android:layout_width="match_parent" android:layout_height="0dip" - android:layout_weight="0.4"/> + android:layout_weight="@integer/kg_widget_region_weight" /> <com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper android:id="@+id/view_flipper" - android:layout_width="@dimen/kg_security_view_width" + android:layout_width="match_parent" android:layout_height="0dip" - android:layout_weight="0.6" + android:layout_weight="@integer/kg_security_flipper_weight" + android:clipChildren="false" + android:clipToPadding="false" + android:paddingLeft="@dimen/keyguard_security_view_margin" + android:paddingTop="@dimen/keyguard_security_view_margin" + android:paddingRight="@dimen/keyguard_security_view_margin" + android:paddingBottom="@dimen/keyguard_security_view_margin" android:layout_gravity="center"> <!-- SelectorView is always used, so add it here. The rest are loaded dynamically --> diff --git a/core/res/res/layout-sw600dp/keyguard_glow_pad_container.xml b/core/res/res/layout-sw600dp/keyguard_glow_pad_container.xml new file mode 100644 index 0000000..1eef099 --- /dev/null +++ b/core/res/res/layout-sw600dp/keyguard_glow_pad_container.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2012, 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"> + <include layout="@layout/keyguard_glow_pad_view" + android:layout_width="@dimen/kg_glow_pad_size" + android:layout_height="@dimen/kg_glow_pad_size" + android:layout_gravity="center" /> +</merge>
\ No newline at end of file diff --git a/core/res/res/layout/keyguard_glow_pad_container.xml b/core/res/res/layout/keyguard_glow_pad_container.xml new file mode 100644 index 0000000..f8364f1 --- /dev/null +++ b/core/res/res/layout/keyguard_glow_pad_container.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2012, 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"> + <include layout="@layout/keyguard_glow_pad_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" /> +</merge>
\ No newline at end of file diff --git a/core/res/res/layout/keyguard_glow_pad_view.xml b/core/res/res/layout/keyguard_glow_pad_view.xml new file mode 100644 index 0000000..509e77b --- /dev/null +++ b/core/res/res/layout/keyguard_glow_pad_view.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2012, 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. +*/ +--> + +<!-- This is the selector widget that allows the user to select an action. --> +<com.android.internal.widget.multiwaveview.GlowPadView + xmlns:prvandroid="http://schemas.android.com/apk/prv/res/android" + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/glow_pad_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:orientation="horizontal" + android:gravity="@integer/kg_selector_gravity" + android:focusable="true" + + prvandroid:targetDrawables="@*android:array/lockscreen_targets_with_camera" + prvandroid:targetDescriptions="@*android:array/lockscreen_target_descriptions_with_camera" + prvandroid:directionDescriptions="@*android:array/lockscreen_direction_descriptions" + prvandroid:handleDrawable="@*android:drawable/ic_lockscreen_handle" + prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring" + prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius" + prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius" + prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin" + prvandroid:feedbackCount="1" + prvandroid:vibrationDuration="20" + prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius" + prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot" /> diff --git a/core/res/res/layout/keyguard_selector_view.xml b/core/res/res/layout/keyguard_selector_view.xml index 8ef3b75..3d3c504 100644 --- a/core/res/res/layout/keyguard_selector_view.xml +++ b/core/res/res/layout/keyguard_selector_view.xml @@ -24,6 +24,8 @@ android:id="@+id/keyguard_selector_view" android:layout_width="match_parent" android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false" android:orientation="vertical"> <include layout="@layout/keyguard_widget_region" @@ -31,43 +33,26 @@ android:layout_height="0dip" android:layout_weight="0.45" /> - <RelativeLayout + <FrameLayout android:layout_width="wrap_content" android:layout_height="0dip" android:layout_weight="0.55" android:layout_gravity="center" + android:clipChildren="false" + android:clipToPadding="false" android:gravity="center"> - <com.android.internal.widget.multiwaveview.GlowPadView - android:id="@+id/glow_pad_view" - android:orientation="horizontal" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:focusable="true" - android:gravity="@integer/kg_selector_gravity" - - prvandroid:targetDrawables="@*android:array/lockscreen_targets_with_camera" - prvandroid:targetDescriptions="@*android:array/lockscreen_target_descriptions_with_camera" - prvandroid:directionDescriptions="@*android:array/lockscreen_direction_descriptions" - prvandroid:handleDrawable="@*android:drawable/ic_lockscreen_handle" - prvandroid:outerRingDrawable="@*android:drawable/ic_lockscreen_outerring" - prvandroid:outerRadius="@*android:dimen/glowpadview_target_placement_radius" - prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius" - prvandroid:snapMargin="@*android:dimen/glowpadview_snap_margin" - prvandroid:feedbackCount="1" - prvandroid:vibrationDuration="20" - prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius" - prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"/> + <include layout="@layout/keyguard_glow_pad_container" /> <include layout="@layout/keyguard_emergency_carrier_area" android:id="@+id/keyguard_selector_fade_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:gravity="center_horizontal" - android:layout_alignParentBottom="true" /> + android:layout_gravity="bottom|center_horizontal" + android:gravity="center_horizontal" /> - </RelativeLayout> + </FrameLayout> </com.android.internal.policy.impl.keyguard.KeyguardSelectorView> diff --git a/core/res/res/layout/keyguard_status_view.xml b/core/res/res/layout/keyguard_status_view.xml index 951787b..0d3d574 100644 --- a/core/res/res/layout/keyguard_status_view.xml +++ b/core/res/res/layout/keyguard_status_view.xml @@ -29,14 +29,14 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:gravity="center_horizontal" + android:gravity="center_horizontal|top" android:contentDescription="@string/keyguard_accessibility_status"> <com.android.internal.policy.impl.keyguard.ClockView android:id="@+id/clock_view" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="-15.5dip" + android:layout_marginTop="@dimen/kg_clock_top_margin" android:layout_marginEnd="@dimen/kg_status_line_font_right_margin" android:layout_gravity="end"> diff --git a/core/res/res/values-land/integers.xml b/core/res/res/values-land/integers.xml index 1b8f575..6613d68 100644 --- a/core/res/res/values-land/integers.xml +++ b/core/res/res/values-land/integers.xml @@ -17,10 +17,9 @@ */ --> <resources> - <integer name="kg_security_flip_duration">150</integer> - <integer name="kg_security_fade_duration">150</integer> - <!-- Gravity to make KeyguardSelectorView work in multiple orientations 0x13 == "left|center_vertical" --> <integer name="kg_selector_gravity">0x13</integer> + <integer name="kg_widget_region_weight">45</integer> + <integer name="kg_security_flipper_weight">55</integer> </resources>
\ No newline at end of file diff --git a/core/res/res/values-port/integers.xml b/core/res/res/values-port/integers.xml new file mode 100644 index 0000000..ef7e4da --- /dev/null +++ b/core/res/res/values-port/integers.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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> + <!-- Gravity to make KeyguardSelectorView work in multiple orientations + 0x31 == "top|center_horizontal" --> + <integer name="kg_selector_gravity">0x31</integer> +</resources>
\ No newline at end of file diff --git a/core/res/res/values-sw380dp-land/dimens.xml b/core/res/res/values-sw380dp-land/dimens.xml new file mode 100644 index 0000000..d1a1bed --- /dev/null +++ b/core/res/res/values-sw380dp-land/dimens.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2012, 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> + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">67dp</dimen> +</resources> diff --git a/core/res/res/values-sw600dp-land/dimens.xml b/core/res/res/values-sw600dp-land/dimens.xml new file mode 100644 index 0000000..5507e5f --- /dev/null +++ b/core/res/res/values-sw600dp-land/dimens.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2006, 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> + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">85dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">16dp</dimen> +</resources>
\ No newline at end of file diff --git a/core/res/res/values-sw600dp-land/integers.xml b/core/res/res/values-sw600dp-land/integers.xml new file mode 100644 index 0000000..5f5d263 --- /dev/null +++ b/core/res/res/values-sw600dp-land/integers.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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="kg_widget_region_weight">50</integer> + <integer name="kg_security_flipper_weight">50</integer> +</resources>
\ No newline at end of file diff --git a/core/res/res/values-sw600dp-port/integers.xml b/core/res/res/values-sw600dp-port/integers.xml new file mode 100644 index 0000000..65b854a --- /dev/null +++ b/core/res/res/values-sw600dp-port/integers.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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="kg_widget_region_weight">46</integer> + <integer name="kg_security_flipper_weight">54</integer> +</resources>
\ No newline at end of file diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml index 0c36d4a..564545a 100644 --- a/core/res/res/values-sw600dp/dimens.xml +++ b/core/res/res/values-sw600dp/dimens.xml @@ -79,11 +79,34 @@ <dimen name="preference_screen_header_padding_side">24dip</dimen> <!-- Keyguard dimensions --> + <!-- Size of the clock font in keyguard's status view --> + <dimen name="kg_status_clock_font_size">141dp</dimen> + + <!-- Size of the date font in keyguard's status view --> + <dimen name="kg_status_date_font_size">25.5dp</dimen> + + <!-- Size of the generic status lines keyguard's status view --> + <dimen name="kg_status_line_font_size">16sp</dimen> + + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">0dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">50dp</dimen> + + <!-- Horizontal padding for the widget pager --> + <dimen name="kg_widget_pager_horizontal_padding">24dp</dimen> + + <!-- Top padding for the widget pager --> + <dimen name="kg_widget_pager_top_padding">24dp</dimen> + <!-- Bottom padding for the widget pager --> <dimen name="kg_widget_pager_bottom_padding">16dp</dimen> <!-- Top margin for the runway lights. We add a negative margin in large devices to account for the widget pager padding --> <dimen name="kg_runway_lights_top_margin">-10dp</dimen> -</resources> + <!-- Margin around the various security views --> + <dimen name="keyguard_security_view_margin">24dp</dimen> +</resources> diff --git a/core/res/res/values-sw720dp-land/dimens.xml b/core/res/res/values-sw720dp-land/dimens.xml new file mode 100644 index 0000000..14726ab --- /dev/null +++ b/core/res/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* //device/apps/common/assets/res/any/dimens.xml +** +** Copyright 2012, 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> + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">174dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">16dp</dimen> + + <!-- Horizontal padding for the widget pager --> + <dimen name="kg_widget_pager_horizontal_padding">32dp</dimen> +</resources> diff --git a/core/res/res/values-sw720dp-port/integers.xml b/core/res/res/values-sw720dp-port/integers.xml new file mode 100644 index 0000000..5f85f71 --- /dev/null +++ b/core/res/res/values-sw720dp-port/integers.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2012, 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="kg_widget_region_weight">48</integer> + <integer name="kg_security_flipper_weight">52</integer> +</resources>
\ No newline at end of file diff --git a/core/res/res/values-sw720dp/dimens.xml b/core/res/res/values-sw720dp/dimens.xml index fc336ae..6144961 100644 --- a/core/res/res/values-sw720dp/dimens.xml +++ b/core/res/res/values-sw720dp/dimens.xml @@ -70,6 +70,36 @@ This helps in aligning titles when some items have icons and some don't. When space is at a premium, we don't pre-allocate any space. --> <dimen name="preference_icon_minWidth">56dp</dimen> -</resources> + <!-- Keyguard dimensions --> + <!-- Size of the clock font in keyguard's status view --> + <dimen name="kg_status_clock_font_size">188dp</dimen> + + <!-- Size of the date font in keyguard's status view --> + <dimen name="kg_status_date_font_size">34dp</dimen> + + <!-- Size of the generic status lines keyguard's status view --> + <dimen name="kg_status_line_font_size">19sp</dimen> + + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">0dp</dimen> + + <!-- Size of margin on the right of keyguard's status view --> + <dimen name="kg_status_line_font_right_margin">32dp</dimen> + <!-- Horizontal padding for the widget pager --> + <dimen name="kg_widget_pager_horizontal_padding">80dp</dimen> + + <!-- Top padding for the widget pager --> + <dimen name="kg_widget_pager_top_padding">32dp</dimen> + + <!-- Bottom padding for the widget pager --> + <dimen name="kg_widget_pager_bottom_padding">36dp</dimen> + + <!-- Top margin for the runway lights. We add a negative margin in large + devices to account for the widget pager padding --> + <dimen name="kg_runway_lights_top_margin">-30dp</dimen> + + <!-- Margin around the various security views --> + <dimen name="keyguard_security_view_margin">100dp</dimen> +</resources> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 10f0d39..345175e 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -243,7 +243,7 @@ <!-- Keyguard dimensions --> <!-- Width of security view in keyguard. --> - <dimen name="kg_security_view_width">500dp</dimen> + <dimen name="kg_glow_pad_size">500dp</dimen> <!-- Height of security view in keyguard. --> <dimen name="kg_security_view_height">0dp</dimen> @@ -264,7 +264,10 @@ <dimen name="kg_status_line_font_size">14sp</dimen> <!-- Size of margin on the right of keyguard's status view --> - <dimen name="kg_status_line_font_right_margin">0dp</dimen> + <dimen name="kg_status_line_font_right_margin">16dp</dimen> + + <!-- Top margin for the clock view --> + <dimen name="kg_clock_top_margin">-16dp</dimen> <!-- Horizontal gap between keys in PIN and SIM PIN numeric keyboards in keyguard --> <dimen name="kg_key_horizontal_gap">0dp</dimen> @@ -304,4 +307,6 @@ <!-- Touch slop for the global toggle accessibility gesture --> <dimen name="accessibility_touch_slop">80dip</dimen> + <!-- Margin around the various security views --> + <dimen name="keyguard_security_view_margin">0dp</dimen> </resources> diff --git a/core/res/res/values/integers.xml b/core/res/res/values/integers.xml index 4b79d1f..6d49a91 100644 --- a/core/res/res/values/integers.xml +++ b/core/res/res/values/integers.xml @@ -19,8 +19,4 @@ <resources> <integer name="kg_security_flip_duration">75</integer> <integer name="kg_security_fade_duration">75</integer> - - <!-- Gravity to make KeyguardSelectorView work in multiple orientations - 0x31 == "top|center_horizontal" --> - <integer name="kg_selector_gravity">0x31</integer> </resources> diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java index 840edaf..74d7939 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java @@ -52,7 +52,6 @@ import android.widget.ViewFlipper; import com.android.internal.R; import com.android.internal.policy.impl.keyguard.KeyguardSecurityModel.SecurityMode; -import com.android.internal.policy.impl.keyguard.KeyguardTransportControlView.SavedState; import com.android.internal.widget.LockPatternUtils; import java.io.File; diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserAvatar.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserAvatar.java index 7266883..3c972bc 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserAvatar.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMultiUserAvatar.java @@ -82,7 +82,7 @@ class KeyguardMultiUserAvatar extends FrameLayout { mUserSelector = userSelector; mUserImage = (ImageView) findViewById(R.id.keyguard_user_avatar); - mUserName = (TextView) findViewById(R.id.keyguard_user_name); + mUserName = (TextView) findViewById(R.id.keyguard_user_name); mUserImage.setImageDrawable(Drawable.createFromPath(mUserInfo.iconPath)); mUserName.setText(mUserInfo.name); diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java index 7e71f94..6a3c7c1 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java @@ -42,6 +42,7 @@ import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; +import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.TextView; @@ -58,7 +59,7 @@ public class KeyguardTransportControlView extends KeyguardWidgetFrame implements private static final int MSG_SET_GENERATION_ID = 104; private static final int MAXDIM = 512; private static final int DISPLAY_TIMEOUT_MS = 5000; // 5s - protected static final boolean DEBUG = true; + protected static final boolean DEBUG = false; protected static final String TAG = "TransportControlView"; private ImageView mAlbumArt; diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java index 3ffd43f..602ee44 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java @@ -48,7 +48,7 @@ import com.android.internal.widget.LockPatternUtils; * reported to this class by the current {@link KeyguardViewBase}. */ public class KeyguardViewManager { - private final static boolean DEBUG = true; + private final static boolean DEBUG = false; private static String TAG = "KeyguardViewManager"; public static boolean USE_UPPER_CASE = true; diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java index 9d9b043..311eec6 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetFrame.java @@ -69,7 +69,7 @@ public class KeyguardWidgetFrame extends FrameLayout { int topPadding = res.getDimensionPixelSize(R.dimen.kg_widget_pager_top_padding); int bottomPadding = res.getDimensionPixelSize(R.dimen.kg_widget_pager_bottom_padding); setPadding(hPadding, topPadding, hPadding, bottomPadding); - mGradientColor = res.getColor(R.color.kg_widget_pager_gradient); + mGradientColor = res.getColor(com.android.internal.R.color.kg_widget_pager_gradient); mGradientPaint.setXfermode(sAddBlendMode); } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetPager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetPager.java index 9dfbba8..1e65665 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetPager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetPager.java @@ -123,7 +123,8 @@ public class KeyguardWidgetPager extends PagedView { if (title == null) { title = ""; } - return mContext.getString(R.string.keyguard_accessibility_widget_changed, + return mContext.getString( + com.android.internal.R.string.keyguard_accessibility_widget_changed, title, nextPageIndex + 1, getChildCount()); } return super.getCurrentPageDescription(); diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetRegion.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetRegion.java index 47bf85b..bd79d67 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetRegion.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetRegion.java @@ -22,9 +22,7 @@ import android.view.ViewGroup; import android.widget.LinearLayout; import com.android.internal.R; -import com.android.internal.policy.impl.keyguard.PagedView.PageSwitchListener; - -public class KeyguardWidgetRegion extends LinearLayout implements PageSwitchListener { +public class KeyguardWidgetRegion extends LinearLayout implements PagedView.PageSwitchListener { KeyguardGlowStripView mLeftStrip; KeyguardGlowStripView mRightStrip; KeyguardWidgetPager mPager; @@ -63,10 +61,10 @@ public class KeyguardWidgetRegion extends LinearLayout implements PageSwitchList } public void showPagingFeedback() { - if (mPage < mPager.getPageCount() - 1) { + if (true || (mPage < mPager.getPageCount() - 1)) { mLeftStrip.makeEmGo(); } - if (mPage > 0) { + if (true || (mPage > 0)) { mRightStrip.makeEmGo(); } } @@ -76,8 +74,7 @@ public class KeyguardWidgetRegion extends LinearLayout implements PageSwitchList boolean showingStatusWidget = false; if (newPage instanceof ViewGroup) { ViewGroup vg = (ViewGroup) newPage; - View view = vg.getChildAt(0); - if (view instanceof KeyguardStatusView) { + if (vg.getChildAt(0) instanceof KeyguardStatusView) { showingStatusWidget = true; } } |