Merge "Removing unused resources"
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/decelerate_interpolator"
|
||||
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
|
||||
android:duration="@integer/config_appsCustomizeFadeInTime" />
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
|
||||
android:duration="@integer/config_appsCustomizeFadeOutTime" />
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/decelerate_interpolator"
|
||||
android:shareInterpolator="true">
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromXDelta="0%p"
|
||||
android:toXDelta="0%p"
|
||||
android:fromYDelta="-20%p"
|
||||
android:toYDelta="0%p"
|
||||
android:duration="500" />
|
||||
<scale
|
||||
android:fromXScale="5.0"
|
||||
android:toXScale="1.0"
|
||||
android:fromYScale="5.0"
|
||||
android:toYScale="1.0"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="100%"
|
||||
android:duration="500" />
|
||||
</set>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:shareInterpolator="true">
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromXDelta="0%p"
|
||||
android:toXDelta="0%p"
|
||||
android:fromYDelta="0%p"
|
||||
android:toYDelta="-20%p"
|
||||
android:duration="500" />
|
||||
<scale
|
||||
android:fromXScale="1.0"
|
||||
android:toXScale="5.0"
|
||||
android:fromYScale="1.0"
|
||||
android:toYScale="5.0"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="100%"
|
||||
android:duration="500" />
|
||||
</set>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/decelerate_interpolator"
|
||||
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"
|
||||
|
||||
android:duration="@integer/config_appsCustomizeFadeInTime" />
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"
|
||||
|
||||
android:duration="@integer/config_appsCustomizeFadeOutTime" />
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromXDelta="0%p"
|
||||
android:toXDelta="0%p"
|
||||
android:fromYDelta="0%p"
|
||||
android:toYDelta="100%p"
|
||||
|
||||
android:duration="500" />
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromXDelta="0%p"
|
||||
android:toXDelta="0%p"
|
||||
android:fromYDelta="100%p"
|
||||
android:toYDelta="0%p"
|
||||
|
||||
android:duration="500" />
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 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_window_focused="true" android:state_focused="true" android:color="#000" />
|
||||
<item android:state_window_focused="false" android:state_focused="true" android:color="#FFF" />
|
||||
<item android:state_window_focused="false" android:color="#FFF" />
|
||||
<item android:state_selected="true" android:color="#000" />
|
||||
<item android:state_pressed="true" android:color="#000" />
|
||||
<item android:color="#FFF" />
|
||||
</selector>
|
||||
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 266 B |
|
Before Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 958 B |
|
Before Width: | Height: | Size: 190 B |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 115 B |
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2007, 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" android:drawable="@drawable/pressed_application_background" />
|
||||
<item android:state_focused="false" android:drawable="@drawable/focused_application_background" />
|
||||
<item android:state_window_focused="true" android:drawable="@drawable/focused_application_background" />
|
||||
<item android:state_window_focused="false" android:drawable="@android:color/transparent" />
|
||||
</selector>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 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" android:drawable="@drawable/home_button_pressed" />
|
||||
<item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/home_button_focused" />
|
||||
<item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/home_button_normal" />
|
||||
<item android:drawable="@drawable/home_button_normal" />
|
||||
</selector>
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
|
||||
android:focusable="false">
|
||||
|
||||
<!-- Global search icon -->
|
||||
<ImageView
|
||||
android:id="@+id/search_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingRight="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingTop="@dimen/toolbar_button_vertical_padding"
|
||||
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
|
||||
android:src="@drawable/ic_search_normal_holo"
|
||||
android:background="@drawable/button_bg"
|
||||
android:onClick="onClickSearchButton"
|
||||
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/accessibility_search_button" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_divider"
|
||||
android:src="@drawable/divider_launcher_holo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toRightOf="@+id/search_button"
|
||||
android:paddingTop="@dimen/toolbar_button_vertical_padding"
|
||||
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
|
||||
|
||||
android:onClick="onClickSearchButton"
|
||||
android:focusable="false"
|
||||
android:clickable="true" />
|
||||
|
||||
<!-- Voice search icon -->
|
||||
<ImageView
|
||||
android:id="@+id/voice_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@+id/search_divider"
|
||||
android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingRight="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingTop="@dimen/toolbar_button_vertical_padding"
|
||||
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
|
||||
android:src="@drawable/ic_voice_search_holo"
|
||||
android:background="@drawable/button_bg"
|
||||
android:onClick="onClickVoiceButton"
|
||||
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/accessibility_voice_search_button" />
|
||||
|
||||
<!-- AllApps icon -->
|
||||
<com.android.launcher2.StrokedTextView
|
||||
android:id="@+id/all_apps_button"
|
||||
android:onClick="onClickAllAppsButton"
|
||||
android:text="@string/all_apps_button_label"
|
||||
android:drawablePadding="@dimen/all_apps_button_drawable_padding"
|
||||
android:drawableLeft="@drawable/ic_home_all_apps_holo_dark"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@+id/all_apps_divider"
|
||||
android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingRight="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingTop="@dimen/all_apps_button_vertical_padding"
|
||||
android:paddingBottom="@dimen/all_apps_button_vertical_padding"
|
||||
android:background="@drawable/button_bg"
|
||||
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="18sp"
|
||||
|
||||
launcher:strokeColor="#991e3157"
|
||||
launcher:strokeTextColor="#DDFFFFFF"
|
||||
launcher:strokeWidth="2.5"
|
||||
|
||||
android:shadowColor="#DA000000"
|
||||
android:shadowDx="0.0"
|
||||
android:shadowDy="0.0"
|
||||
android:shadowRadius="2.5"
|
||||
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/accessibility_all_apps_button" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/all_apps_divider"
|
||||
android:src="@drawable/divider_launcher_holo"
|
||||
android:onClick="onClickAllAppsButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toLeftOf="@+id/configure_button"
|
||||
android:paddingTop="@dimen/toolbar_button_vertical_padding"
|
||||
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
|
||||
|
||||
android:focusable="false"
|
||||
android:clickable="true" />
|
||||
|
||||
<!-- Customize icon -->
|
||||
<ImageView
|
||||
android:id="@+id/configure_button"
|
||||
android:src="@drawable/ic_home_add_holo_dark"
|
||||
android:onClick="onClickConfigureButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingRight="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingTop="@dimen/toolbar_button_vertical_padding"
|
||||
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
|
||||
android:background="@drawable/button_bg"
|
||||
android:focusable="true"
|
||||
android:contentDescription="@string/accessibility_customize_button" />
|
||||
|
||||
<!-- Delete icon -->
|
||||
<com.android.launcher2.DeleteZone
|
||||
android:id="@+id/delete_zone"
|
||||
android:text="@string/delete_zone_label_workspace"
|
||||
android:drawablePadding="@dimen/delete_zone_drawable_padding"
|
||||
android:drawableLeft="@drawable/delete_target_selector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignRight="@+id/configure_button"
|
||||
android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingRight="@dimen/toolbar_button_horizontal_padding"
|
||||
android:paddingTop="@dimen/toolbar_button_vertical_padding"
|
||||
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
|
||||
android:background="@drawable/button_bg"
|
||||
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:textColor="@color/workspace_all_apps_and_delete_zone_text_color"
|
||||
android:textSize="18sp"
|
||||
android:shadowColor="@color/workspace_all_apps_and_delete_zone_text_shadow_color"
|
||||
android:shadowDx="0.0"
|
||||
android:shadowDy="0.0"
|
||||
android:shadowRadius="2.0"
|
||||
|
||||
android:visibility="gone"
|
||||
launcher:direction="horizontal"
|
||||
|
||||
android:focusable="true"
|
||||
android:contentDescription="@string/accessibility_delete_button" />
|
||||
</RelativeLayout>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 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.launcher2.PagedViewWidget
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
|
||||
launcher:blurColor="#FF6B8CF0"
|
||||
launcher:outlineColor="#FF8CD2FF"
|
||||
|
||||
android:background="@drawable/focusable_view_bg"
|
||||
android:focusable="true">
|
||||
|
||||
<!-- The wallpaper preview. -->
|
||||
<ImageView
|
||||
android:id="@+id/widget_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:paddingBottom="10dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitStart" />
|
||||
|
||||
<!-- The divider image. -->
|
||||
<ImageView
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:src="@drawable/widget_divider" />
|
||||
|
||||
<!-- The name of the wallpaper. -->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/widget_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:gravity="left|bottom"
|
||||
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="14sp"
|
||||
android:shadowColor="#FF000000"
|
||||
android:shadowDx="0.0"
|
||||
android:shadowDy="1.0"
|
||||
android:shadowRadius="1.0"
|
||||
|
||||
android:maxLines="2"
|
||||
android:fadingEdge="horizontal" />
|
||||
</com.android.launcher2.PagedViewWidget>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="200dip"
|
||||
android:layout_height="200dip"
|
||||
android:padding="20dip"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal|center_vertical|clip_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#ffffffff" />
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="600dip"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dip"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal|center_vertical|clip_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#ffffffff" />
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="?android:attr/listSeparatorTextViewStyle" />
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="?android:attr/scrollbarSize">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal" />
|
||||
|
||||
<TextView android:id="@+id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_alignLeft="@id/title"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:maxLines="2" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="4dip"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:focusable="false"
|
||||
android:clickable="false" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:textAppearance="?android:attr/textAppearanceLargeInverse"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="14dip"
|
||||
android:paddingLeft="15dip"
|
||||
android:paddingRight="15dip" />
|
||||
@@ -1,22 +1,8 @@
|
||||
<resources>
|
||||
<!-- AllApps/Customize/AppsCustomize -->
|
||||
<!-- Fade/zoom in/out duration & scale in the Customize transition.
|
||||
Note: This should be less than the workspaceShrinkTime as they happen together. -->
|
||||
<integer name="config_customizeZoomInTime">800</integer>
|
||||
<integer name="config_customizeZoomOutTime">600</integer>
|
||||
<integer name="config_customizeZoomScaleFactor">7</integer>
|
||||
<integer name="config_customizeFadeInTime">800</integer>
|
||||
<!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->
|
||||
<integer name="config_workspaceSpringLoadShrinkPercentage">90</integer>
|
||||
|
||||
<!-- The slope, in percent, of the drag movement needed to drag an item out of
|
||||
Customize (y / x * 100%) -->
|
||||
<integer name="config_customizationDrawerDragSlopeThreshold">150</integer>
|
||||
|
||||
<!-- Duration in milliseconds of the animations between all apps, customize, & home.
|
||||
NOTE: If these are changed, the toolbar animation times below should also be. -->
|
||||
<integer name="config_customizeWorkspaceShrinkTime">800</integer>
|
||||
|
||||
<!-- Workspace -->
|
||||
<!-- Whether or not the drop targets drop down as opposed to fade in -->
|
||||
<bool name="config_useDropTargetDownTransition">true</bool>
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
<dimen name="allAppsSmallScreenVerticalMarginLandscape">30dip</dimen>
|
||||
<dimen name="allAppsSmallScreenVerticalMarginPortrait">60dip</dimen>
|
||||
|
||||
<dimen name="all_apps_button_drawable_padding">0dip</dimen>
|
||||
<dimen name="all_apps_button_vertical_padding">4dip</dimen>
|
||||
|
||||
<!-- roughly a status bar (for determining how many rows of icons are in home) -->
|
||||
@@ -64,9 +63,6 @@
|
||||
<dimen name="wallpaper_chooser_grid_height">140dp</dimen>
|
||||
<dimen name="live_wallpaper_grid_item_padding">8dip</dimen>
|
||||
|
||||
<!-- live_wallpaper_grid_item_width + 2 * live_wallpaper_grid_item_padding-->
|
||||
<dimen name="live_wallpaper_column_width">212dip</dimen>
|
||||
|
||||
<!-- How much the content view of an alert dialog should be inset (currently used
|
||||
for the WallpaperChooser in XLarge mode) -->
|
||||
<dimen name="alert_dialog_content_inset">0dp</dimen>
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
|
||||
<resources>
|
||||
<!-- Workspace -->
|
||||
<style name="ScrollIndicatorTrack">
|
||||
<item name="android:visibility">gone</item>
|
||||
<item name="android:alpha">0</item>
|
||||
</style>
|
||||
|
||||
<style name="WorkspaceIcon.Portrait">
|
||||
<item name="android:drawablePadding">4dp</item>
|
||||
<item name="android:paddingLeft">4dp</item>
|
||||
|
||||
@@ -23,17 +23,9 @@
|
||||
<color name="delete_target_hover_tint">#DAFF0000</color>
|
||||
<color name="info_target_hover_tint">#DA0099CC</color>
|
||||
|
||||
<color name="window_background">#FF191919</color>
|
||||
<color name="grid_dark_background">#EB191919</color>
|
||||
<color name="bubble_dark_background">#20000000</color>
|
||||
|
||||
<color name="appwidget_error_color">#FCCC</color>
|
||||
<color name="snag_callout_color">#F444</color>
|
||||
|
||||
<color name="gesture_color">#ff0563c1</color>
|
||||
<color name="uncertain_gesture_color">#ff848484</color>
|
||||
|
||||
<color name="dimmed_view_color">#FF7F7F7F</color>
|
||||
|
||||
<color name="drag_outline_color">#6595f9</color>
|
||||
|
||||
@@ -44,5 +36,4 @@
|
||||
|
||||
<color name="workspace_all_apps_and_delete_zone_text_color">#CCFFFFFF</color>
|
||||
<color name="workspace_all_apps_and_delete_zone_text_shadow_color">#A0000000</color>
|
||||
<color name="workspace_delete_zone_drag_text_color">#FFFF0000</color>
|
||||
</resources>
|
||||
|
||||
@@ -36,12 +36,6 @@
|
||||
AppsCustomize (y / x * 100%) -->
|
||||
<integer name="config_appsCustomizeDragSlopeThreshold">150</integer>
|
||||
|
||||
<!-- Fade in/out duration of toolbar/button bar icons.
|
||||
Note: In + Out duration together should be less the duration of the transition
|
||||
between AllApps, Customize & the Workspace. -->
|
||||
<integer name="config_toolbarButtonFadeInTime">350</integer>
|
||||
<integer name="config_toolbarButtonFadeOutTime">200</integer>
|
||||
|
||||
<!-- Batch loading for loading in LauncherModel -->
|
||||
<integer name="config_allAppsBatchLoadDelay">0</integer>
|
||||
<integer name="config_allAppsBatchSize">0</integer>
|
||||
|
||||
@@ -47,10 +47,6 @@
|
||||
<!-- Drag padding to add to the drop targets -->
|
||||
<dimen name="drop_target_drag_padding">20dp</dimen>
|
||||
|
||||
<!-- so we have access to this dimension in landscape mode even though
|
||||
button_bar_height changes -->
|
||||
<dimen name="button_bar_height_portrait">80dip</dimen>
|
||||
|
||||
<!-- extra horizontal spacing between mini screen thumbnails ie. in all
|
||||
apps and in customization mode -->
|
||||
<dimen name="smallScreenExtraSpacing">0dip</dimen>
|
||||
@@ -67,10 +63,6 @@
|
||||
home icon in landscape) -->
|
||||
<dimen name="status_bar_height">25dip</dimen>
|
||||
|
||||
<!-- roughly half a status bar (for vertically centering the right-hand
|
||||
button cluster in landscape) -->
|
||||
<dimen name="half_status_bar_height">12dip</dimen>
|
||||
|
||||
<!-- Dragging -->
|
||||
<!-- the area at the edge of the screen that makes the workspace go left
|
||||
or right while you're dragging. -->
|
||||
|
||||
@@ -24,13 +24,6 @@
|
||||
<string name="sharedUserId" translatable="false"><xliff:g id="x"></xliff:g></string>
|
||||
<!-- Do not translate. android:process of this application. -->
|
||||
<string name="process" translatable="false"><xliff:g id="x"></xliff:g></string>
|
||||
|
||||
<!-- Do not translate. We wish to prioritize the Wallpaper and Live Wallpaper pickers,
|
||||
but because they are in a different package, we need to reference the component in
|
||||
a non language-dependent way. If the Live Wallpaper picker component name changes
|
||||
this will have to be updated as well. -->
|
||||
<string name="live_wallpaper_picker_package_name" translatable="false">com.android.wallpaper.livepicker</string>
|
||||
<string name="live_wallpaper_picker_class_name" translatable="false">com.android.wallpaper.livepicker.LiveWallpaperActivity</string>
|
||||
|
||||
<!-- General -->
|
||||
<skip />
|
||||
@@ -40,30 +33,10 @@
|
||||
<string name="uid_name">Android Core Apps</string>
|
||||
<!-- Default folder name -->
|
||||
<string name="folder_name"></string>
|
||||
<!-- Title of dialog that appears after user selects Wallpaper from menu -->
|
||||
<string name="chooser_wallpaper">Select wallpaper from</string>
|
||||
<!-- Button label on Wallpaper Gallery screen; user selects this button to set a specific wallpaper -->
|
||||
<string name="wallpaper_instructions">Set wallpaper</string>
|
||||
<!-- Option in "Select wallpaper from" dialog box -->
|
||||
<string name="pick_wallpaper">Wallpapers</string>
|
||||
<!-- Displayed when user selects a shortcut for an app that was uninstalled [CHAR_LIMIT=none]-->
|
||||
<string name="activity_not_found">Application is not installed.</string>
|
||||
<!-- List item for configuring the current wallpaper -->
|
||||
<string name="configure_wallpaper">Configure...</string>
|
||||
<!-- Labels for the tabs in the customize drawer -->
|
||||
<string name="widgets_tab_label">Widgets</string>
|
||||
<!-- Title of tab containing all possible folders (ie standard Folders and Live Folders) that
|
||||
can be added to the home screen -->
|
||||
<string name="folders_tab_label">Folders</string>
|
||||
<!-- Title of tab containing all possible shortcuts (eg Contacts, Bookmarks) that can be
|
||||
added to the home screen -->
|
||||
<string name="shortcuts_tab_label">More</string>
|
||||
<!-- Title of tab for configuring wallpapers -->
|
||||
<string name="wallpapers_tab_label">Wallpapers</string>
|
||||
<!-- Title of tab for configuring applications -->
|
||||
<string name="applications_tab_label">App shortcuts</string>
|
||||
<!-- Placeholder text, will be removed -->
|
||||
<string name="wallpapers_temp_tab_text">This will be the wallpapers tab</string>
|
||||
|
||||
<!-- AppsCustomize pane -->
|
||||
<!-- Message to tell the user to long-press on a widget to add it [CHAR_LIMIT=50] -->
|
||||
@@ -102,22 +75,10 @@
|
||||
<string name="menu_item_add_item">Add to Home screen</string>
|
||||
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all apps -->
|
||||
<string name="group_applications">Applications</string>
|
||||
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all shortcuts -->
|
||||
<string name="group_shortcuts">Shortcuts</string>
|
||||
<!-- Options in "Add to Home" dialog box; Title of the folder gadget -->
|
||||
<string name="group_folder">New folder</string>
|
||||
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all live folders -->
|
||||
<string name="group_live_folders">Folders</string>
|
||||
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all widgets/gadgets -->
|
||||
<string name="group_widgets">Widgets</string>
|
||||
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of apps that can set the wallpaper-->
|
||||
<string name="group_wallpapers">Wallpapers</string>
|
||||
<!-- Options in "Add to Home" dialog box; Name of the Folder widget-->
|
||||
<string name="add_folder">Folder</string>
|
||||
<!-- Options in "Add to Home" dialog box; Name of the Clock widget-->
|
||||
<string name="add_clock">Clock</string>
|
||||
<!-- Options in "Add to Home" dialog box; Name of the Picture frame widget-->
|
||||
<string name="add_photo_frame">Picture frame</string>
|
||||
<!-- Error message when user has filled a home screen, possibly not used -->
|
||||
<string name="out_of_space">No more room on this Home screen.</string>
|
||||
<!-- Error message when user tries to drop an invalid item on the hotseat -->
|
||||
@@ -133,8 +94,6 @@
|
||||
<string name="title_select_shortcut">Select shortcut</string>
|
||||
<!-- Title of dialog when user is selecting an application to add to homescreen -->
|
||||
<string name="title_select_application">Select application</string>
|
||||
<!-- Title of dialog when user is selecting live folder to add to homescreen -->
|
||||
<string name="title_select_live_folder">Select folder</string>
|
||||
|
||||
<!-- All applications label -->
|
||||
<string name="all_apps_button_label">Apps</string>
|
||||
@@ -161,8 +120,6 @@
|
||||
<string name="accessibility_voice_search_button">Voice Search</string>
|
||||
<!-- Accessibility: AllApps button -->
|
||||
<string name="accessibility_all_apps_button">Applications</string>
|
||||
<!-- Accessibility: Customize button -->
|
||||
<string name="accessibility_customize_button">Customize</string>
|
||||
<!-- Accessibility: Delete button -->
|
||||
<string name="accessibility_delete_button">Remove</string>
|
||||
|
||||
@@ -182,8 +139,6 @@
|
||||
<string name="menu_search">Search</string>
|
||||
<!-- Noun, menu item used to bring down the notifications shade -->
|
||||
<string name="menu_notifications">Notifications</string>
|
||||
<!-- Noun, menu item used to show the gestures settings -->
|
||||
<string name="menu_gestures">Gestures</string>
|
||||
<!-- Noun, menu item used to show the system settings -->
|
||||
<string name="menu_settings">Settings</string>
|
||||
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AnimationPreview">
|
||||
<item name="android:windowEnterAnimation">@anim/fade_in_fast</item>
|
||||
<item name="android:windowExitAnimation">@anim/fade_out_fast</item>
|
||||
</style>
|
||||
|
||||
<style name="WorkspaceIcon">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
@@ -151,23 +146,4 @@
|
||||
<item name="android:shadowDy">0.0</item>
|
||||
<item name="android:shadowRadius">2.0</item>
|
||||
</style>
|
||||
|
||||
<style name="HotseatButton">
|
||||
<item name="android:paddingLeft">12dip</item>
|
||||
<item name="android:paddingRight">12dip</item>
|
||||
<item name="android:background">@drawable/hotseat_bg_center</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">fill_parent</item>
|
||||
<item name="android:scaleType">center</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:clickable">true</item>
|
||||
</style>
|
||||
<style name="HotseatButton.Left">
|
||||
<item name="android:layout_marginLeft">4dip</item>
|
||||
<item name="android:background">@drawable/hotseat_bg_left</item>
|
||||
</style>
|
||||
<style name="HotseatButton.Right">
|
||||
<item name="android:layout_marginRight">4dip</item>
|
||||
<item name="android:background">@drawable/hotseat_bg_right</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -30,16 +30,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* A keyboard listener we set on all the button bar buttons.
|
||||
*/
|
||||
class ButtonBarKeyEventListener implements View.OnKeyListener {
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
return FocusHelper.handleButtonBarButtonKeyEvent(v, keyCode, event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A keyboard listener we set on all the hotseat buttons.
|
||||
*/
|
||||
@@ -445,95 +435,6 @@ public class FocusHelper {
|
||||
return wasHandled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles key events in the workspace button bar.
|
||||
*/
|
||||
static boolean handleButtonBarButtonKeyEvent(View v, int keyCode, KeyEvent e) {
|
||||
if (!LauncherApplication.isScreenLarge()) return false;
|
||||
|
||||
final ViewGroup parent = (ViewGroup) v.getParent();
|
||||
final ViewGroup launcher = (ViewGroup) parent.getParent();
|
||||
final Workspace workspace = (Workspace) launcher.findViewById(R.id.workspace);
|
||||
final int buttonIndex = parent.indexOfChild(v);
|
||||
final int buttonCount = parent.getChildCount();
|
||||
final int pageIndex = workspace.getCurrentPage();
|
||||
final int pageCount = workspace.getChildCount();
|
||||
final int firstButtonIndex = parent.indexOfChild(parent.findViewById(R.id.search_button));
|
||||
final int lastButtonIndex = parent.indexOfChild(parent.findViewById(R.id.configure_button));
|
||||
|
||||
final int action = e.getAction();
|
||||
final boolean handleKeyEvent = (action != KeyEvent.ACTION_UP);
|
||||
boolean wasHandled = false;
|
||||
switch (keyCode) {
|
||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
||||
if (handleKeyEvent) {
|
||||
// Select the previous button, otherwise do nothing (since the button bar is
|
||||
// static)
|
||||
if (buttonIndex > firstButtonIndex) {
|
||||
int newButtonIndex = buttonIndex - 1;
|
||||
while (newButtonIndex >= firstButtonIndex) {
|
||||
View prev = parent.getChildAt(newButtonIndex);
|
||||
if (isVisible(prev) && prev.isFocusable()) {
|
||||
prev.requestFocus();
|
||||
break;
|
||||
}
|
||||
--newButtonIndex;
|
||||
}
|
||||
} else {
|
||||
if (pageIndex > 0) {
|
||||
// Snap to previous page and clear focus
|
||||
workspace.snapToPage(pageIndex - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
wasHandled = true;
|
||||
break;
|
||||
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
||||
if (handleKeyEvent) {
|
||||
// Select the next button, otherwise do nothing (since the button bar is
|
||||
// static)
|
||||
if (buttonIndex < lastButtonIndex) {
|
||||
int newButtonIndex = buttonIndex + 1;
|
||||
while (newButtonIndex <= lastButtonIndex) {
|
||||
View next = parent.getChildAt(newButtonIndex);
|
||||
if (isVisible(next) && next.isFocusable()) {
|
||||
next.requestFocus();
|
||||
break;
|
||||
}
|
||||
++newButtonIndex;
|
||||
}
|
||||
} else {
|
||||
if (pageIndex < (pageCount - 1)) {
|
||||
// Snap to next page and clear focus
|
||||
workspace.snapToPage(pageIndex + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
wasHandled = true;
|
||||
break;
|
||||
case KeyEvent.KEYCODE_DPAD_UP:
|
||||
// Do nothing
|
||||
wasHandled = true;
|
||||
break;
|
||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
||||
if (handleKeyEvent) {
|
||||
// Select the first bubble text view in the current page of the workspace
|
||||
final CellLayout layout = (CellLayout) workspace.getChildAt(pageIndex);
|
||||
final CellLayoutChildren children = layout.getChildrenLayout();
|
||||
final View newIcon = getBubbleTextViewInDirection(layout, children, -1, 1);
|
||||
if (newIcon != null) {
|
||||
newIcon.requestFocus();
|
||||
} else {
|
||||
workspace.requestFocus();
|
||||
}
|
||||
}
|
||||
wasHandled = true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return wasHandled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles key events in the workspace hotseat (bottom of the screen).
|
||||
*/
|
||||
|
||||