summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-06-06 22:51:42 -0700
committerDianne Hackborn <hackbod@google.com>2010-06-07 12:33:53 -0700
commit728ac35373028b79205a788c526ef4b495518ec1 (patch)
treee011bd482891bfccd0b3250a8e0ac6720bc40f5c /res/layout
parent2486572bd6c963483197d6c29eef240e6621aeae (diff)
downloadpackages_apps_settings-728ac35373028b79205a788c526ef4b495518ec1.zip
packages_apps_settings-728ac35373028b79205a788c526ef4b495518ec1.tar.gz
packages_apps_settings-728ac35373028b79205a788c526ef4b495518ec1.tar.bz2
New Running Services UI.
This introduces a simplified (thanks, dsandler!) UI for Running Services, collapsing the groups of apps and processes into single lines. Tapping on a line moves to a new activity showing details on that group, where the stop functionality is now available. This UI is now also integrated into Manage Applications, as the Running tab. You no longer get a really confusing, misleading, scary list of every package that appears to be laying around for some reason. The code was also re-organized, to put everything related to Manage Applications and Running Services under its own package. There is still some clean-up -- some performance improvements (such as not re-computing the world when we switch to the details view), and if this looks good then eradicating the old running services UI. Change-Id: I3fc059c18060600742cab5b455d11ff74bf45ae3
Diffstat (limited to 'res/layout')
-rwxr-xr-xres/layout/compute_sizes.xml21
-rwxr-xr-xres/layout/manage_applications_item.xml1
-rw-r--r--res/layout/running_processes_item.xml94
-rw-r--r--res/layout/running_processes_view.xml60
-rw-r--r--res/layout/running_service_details.xml36
-rw-r--r--res/layout/running_service_details_process.xml37
-rw-r--r--res/layout/running_service_details_service.xml48
-rw-r--r--res/layout/running_services.xml2
-rw-r--r--res/layout/separator_label.xml21
9 files changed, 313 insertions, 7 deletions
diff --git a/res/layout/compute_sizes.xml b/res/layout/compute_sizes.xml
index 4ba5b3e..502488f 100755
--- a/res/layout/compute_sizes.xml
+++ b/res/layout/compute_sizes.xml
@@ -14,9 +14,20 @@
limitations under the License.
-->
-<ListView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/list"
- android:drawSelectorOnTop="false"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent" >
+
+ <ListView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/list"
+ android:drawSelectorOnTop="false"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <view class="com.android.settings.applications.RunningProcessesView"
+ android:id="@+id/running_processes"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+</FrameLayout> \ No newline at end of file
diff --git a/res/layout/manage_applications_item.xml b/res/layout/manage_applications_item.xml
index cdf4c9d..48274ce 100755
--- a/res/layout/manage_applications_item.xml
+++ b/res/layout/manage_applications_item.xml
@@ -31,7 +31,6 @@
<ImageView android:id="@+id/app_icon"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
- android:layout_marginLeft="5dip"
android:layout_marginRight="11dip"
android:layout_gravity="center_vertical"
android:scaleType="fitCenter"/>
diff --git a/res/layout/running_processes_item.xml b/res/layout/running_processes_item.xml
new file mode 100644
index 0000000..dacee9e
--- /dev/null
+++ b/res/layout/running_processes_item.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<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:orientation="vertical"
+ android:gravity="fill" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ android:paddingRight="6dip"
+ android:paddingLeft="6dip"
+ android:gravity="center_vertical" >
+
+ <ImageView android:id="@+id/icon"
+ android:layout_width="@android:dimen/app_icon_size"
+ android:layout_height="@android:dimen/app_icon_size"
+ android:layout_marginRight="11dip"
+ android:layout_gravity="center_vertical"
+ android:scaleType="fitCenter"/>
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+ <LinearLayout
+ android:orientation="horizontal"
+ android:baselineAlignedChildIndex="0"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <TextView android:id="@+id/name"
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingRight="4dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:layout_marginBottom="2dip" />
+ <TextView android:id="@+id/size"
+ android:layout_gravity="center_vertical|right"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </LinearLayout>
+ <LinearLayout
+ android:orientation="horizontal"
+ android:baselineAlignedChildIndex="0"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <TextView android:id="@+id/description"
+ android:layout_gravity="center_vertical|left"
+ android:layout_width="0px"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingRight="4dip"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ <TextView android:id="@+id/uptime"
+ android:layout_gravity="center_vertical|right"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
+ </LinearLayout>
+ </LinearLayout>
+ </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/running_processes_view.xml b/res/layout/running_processes_view.xml
new file mode 100644
index 0000000..6810ba0
--- /dev/null
+++ b/res/layout/running_processes_view.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2010 Google Inc.
+ *
+ * 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="match_parent"
+ android:orientation="vertical">
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="0px"
+ android:layout_weight="1">
+ <ListView android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:drawSelectorOnTop="false"
+ android:fastScrollEnabled="true" />
+ <TextView android:id="@android:id/empty"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:text="@string/no_running_services"
+ android:textAppearance="?android:attr/textAppearanceLarge" />
+ </FrameLayout>
+ <view class="com.android.settings.applications.RunningProcessesView$LinearColorBar"
+ android:id="@+id/color_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="4dp">
+ <TextView android:id="@+id/foregroundText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textAppearance="?android:attr/textAppearanceSmallInverse"
+ android:color="?android:attr/textColorPrimaryInverse"
+ android:singleLine="true" />
+ <TextView android:id="@+id/backgroundText"
+ android:layout_gravity="center_vertical|right"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:textAppearance="?android:attr/textAppearanceSmallInverse"
+ android:color="?android:attr/textColorPrimaryInverse"
+ android:singleLine="true" />
+ </view>
+</LinearLayout>
diff --git a/res/layout/running_service_details.xml b/res/layout/running_service_details.xml
new file mode 100644
index 0000000..98c144c
--- /dev/null
+++ b/res/layout/running_service_details.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <LinearLayout
+ android:id="@+id/all_details"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <!-- Summary information as per previous screen -->
+ <include
+ layout="@layout/running_processes_item"
+ android:id="@+id/snippet"/>
+
+ </LinearLayout>
+</ScrollView>
+
diff --git a/res/layout/running_service_details_process.xml b/res/layout/running_service_details_process.xml
new file mode 100644
index 0000000..d12b486
--- /dev/null
+++ b/res/layout/running_service_details_process.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <!-- Icon and label of the service. -->
+ <include
+ layout="@layout/running_processes_item"
+ android:id="@+id/service"/>
+
+ <TextView android:id="@+id/comp_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:paddingLeft="14dip"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+</LinearLayout>
diff --git a/res/layout/running_service_details_service.xml b/res/layout/running_service_details_service.xml
new file mode 100644
index 0000000..b9f9bbe
--- /dev/null
+++ b/res/layout/running_service_details_service.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <!--
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:src="?android:attr/listDivider"/>
+ -->
+
+ <!-- Icon and label of the service. -->
+ <include
+ layout="@layout/running_processes_item"
+ android:id="@+id/service"/>
+
+ <TextView android:id="@+id/comp_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:paddingLeft="14dip"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <include
+ layout="@layout/two_buttons_panel"
+ android:id="@+id/control_buttons_panel"/>
+
+</LinearLayout>
diff --git a/res/layout/running_services.xml b/res/layout/running_services.xml
index 5c0da6f..faca22c 100644
--- a/res/layout/running_services.xml
+++ b/res/layout/running_services.xml
@@ -35,7 +35,7 @@
android:text="@string/no_running_services"
android:textAppearance="?android:attr/textAppearanceLarge" />
</FrameLayout>
- <view class="com.android.settings.RunningServices$LinearColorBar"
+ <view class="com.android.settings.applications.RunningServices$LinearColorBar"
android:id="@+id/color_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/separator_label.xml b/res/layout/separator_label.xml
new file mode 100644
index 0000000..b0e69fa
--- /dev/null
+++ b/res/layout/separator_label.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ style="?android:attr/listSeparatorTextViewStyle" />