From 52ee4888be22737314656934d2a13ce32c1c190f Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Thu, 24 Oct 2019 14:31:54 +0800 Subject: [PATCH] Modify Running Services layout - Also remove some unused resource Fixes: 139911198 Test: manual Change-Id: I70447255df822c5b2a940ecbc3f2fa27707c660b Screenshot: https://screenshot.googleplex.com/jBEdhunufTb --- res/drawable-hdpi/dotted_line_480px.png | Bin 135 -> 0 bytes res/drawable-mdpi/dotted_line_480px.png | Bin 129 -> 0 bytes res/drawable-xhdpi/dotted_line_480px.png | Bin 799 -> 0 bytes res/layout/preference.xml | 65 -------------- res/layout/preference_widget_two_summary.xml | 38 ++++++++ res/layout/running_processes_header.xml | 51 +++-------- res/layout/running_processes_item.xml | 82 ++++-------------- res/layout/running_processes_view.xml | 43 +++++---- res/layout/separator_label.xml | 21 ----- res/layout/tall_preference_category.xml | 29 ------- res/layout/widget_text_views.xml | 50 ----------- .../applications/RunningProcessesView.java | 10 +-- .../applications/RunningServiceDetails.java | 4 +- 13 files changed, 97 insertions(+), 296 deletions(-) delete mode 100644 res/drawable-hdpi/dotted_line_480px.png delete mode 100755 res/drawable-mdpi/dotted_line_480px.png delete mode 100644 res/drawable-xhdpi/dotted_line_480px.png delete mode 100644 res/layout/preference.xml create mode 100644 res/layout/preference_widget_two_summary.xml delete mode 100644 res/layout/separator_label.xml delete mode 100644 res/layout/tall_preference_category.xml delete mode 100644 res/layout/widget_text_views.xml diff --git a/res/drawable-hdpi/dotted_line_480px.png b/res/drawable-hdpi/dotted_line_480px.png deleted file mode 100644 index 4c25bae38538e5162b2542743d71fdb179e10bd2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmeAS@N?(olHy`uVBq!ia0y~yU=9Pa89CU12N=y%QawF@>)0Jf~_TPVv9F_G{u@BY(-#pPjL%VkAzT zH(UH8>DSb`M(&SyT;n))Q**Q6QS-8lzj=n-f`1JDo-A9tUnec<&sj5nV}XP6+fMTI zBpzCru=;d~i@@=)nSF-SKjsw9TqfhXsNFLsY+2Ho5|NW~Y&Vwp1okO>wO_U|aG64n ziP@=!pA2pj-X*e0r!XX@Y;shKK6A;cC+FI3AE$_!hpT3`BtEe^lRWpd3y=R=ReIg~w9H#V~t|-zJHEMjx}ehqBfNN9sPlxZaeHdB!oV?!Pngtemsu(>|^9 zZnQhI>1OxM{~}J`lK9?d)U@uDJNGzO@rn1D@*NJZxt}`SyYxe*+a~7BY_a(}W0F2= zPMf9on77w|!=1yTd-6USJ}6jv*8NoIo@E~u!+!r_$c|W9s;k{P;fPiH>&mN-YNtzY zxp&wtEaUDGF2$4+m(T7|YI$=|tUWrHZR+ic$Yk?vv)^5~)jD_2l8wTsfQsR$epK5p@dNsgrm!J~8P8C&!$8EnqrQEpd$~Nl7e8 zwMs5Z1yT$~28M>Z2FALEW+8@VRt9EPrUtqO=2ivzopr0DA{cUjP6A diff --git a/res/layout/preference.xml b/res/layout/preference.xml deleted file mode 100644 index 195671b5655..00000000000 --- a/res/layout/preference.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/res/layout/preference_widget_two_summary.xml b/res/layout/preference_widget_two_summary.xml new file mode 100644 index 00000000000..3f951dae62d --- /dev/null +++ b/res/layout/preference_widget_two_summary.xml @@ -0,0 +1,38 @@ + + + + + + + + diff --git a/res/layout/running_processes_header.xml b/res/layout/running_processes_header.xml index b2db025fe9d..384c0b692f4 100644 --- a/res/layout/running_processes_header.xml +++ b/res/layout/running_processes_header.xml @@ -55,38 +55,29 @@ android:scaleType="centerInside" android:src="@color/running_processes_system_ram" android:contentDescription="@null" /> - + android:layout_gravity="center"> - - + - - - + - - - + - - - - - - - - - - - - - - - - - - - - - + android:layout_height="match_parent"> + + + \ No newline at end of file diff --git a/res/layout/running_processes_view.xml b/res/layout/running_processes_view.xml index 19293abf000..a1cc6abf1ad 100644 --- a/res/layout/running_processes_view.xml +++ b/res/layout/running_processes_view.xml @@ -15,26 +15,31 @@ * limitations under the License. --> - + + - - + android:layout_height="match_parent" + android:paddingStart="0dp" + android:paddingEnd="0dp" + android:drawSelectorOnTop="false" + android:scrollbarStyle="outsideOverlay" + android:fastScrollEnabled="true"/> + diff --git a/res/layout/separator_label.xml b/res/layout/separator_label.xml deleted file mode 100644 index b0e69fa05a6..00000000000 --- a/res/layout/separator_label.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - diff --git a/res/layout/tall_preference_category.xml b/res/layout/tall_preference_category.xml deleted file mode 100644 index 7eefdab9ffe..00000000000 --- a/res/layout/tall_preference_category.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/res/layout/widget_text_views.xml b/res/layout/widget_text_views.xml deleted file mode 100644 index 9f0506e3e8c..00000000000 --- a/res/layout/widget_text_views.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - diff --git a/src/com/android/settings/applications/RunningProcessesView.java b/src/com/android/settings/applications/RunningProcessesView.java index 5491ad14c6c..5198a4ac037 100644 --- a/src/com/android/settings/applications/RunningProcessesView.java +++ b/src/com/android/settings/applications/RunningProcessesView.java @@ -164,11 +164,11 @@ public class RunningProcessesView extends FrameLayout public ViewHolder(View v) { rootView = v; - icon = (ImageView)v.findViewById(R.id.icon); - name = (TextView)v.findViewById(R.id.name); - description = (TextView)v.findViewById(R.id.description); - size = (TextView)v.findViewById(R.id.size); - uptime = (TextView)v.findViewById(R.id.uptime); + icon = v.findViewById(android.R.id.icon); + name = v.findViewById(android.R.id.title); + description = v.findViewById(android.R.id.summary); + size = v.findViewById(R.id.widget_summary1); + uptime = v.findViewById(R.id.widget_summary2); v.setTag(this); } diff --git a/src/com/android/settings/applications/RunningServiceDetails.java b/src/com/android/settings/applications/RunningServiceDetails.java index 6165fb43b84..e95b41ae0e7 100644 --- a/src/com/android/settings/applications/RunningServiceDetails.java +++ b/src/com/android/settings/applications/RunningServiceDetails.java @@ -226,7 +226,7 @@ public class RunningServiceDetails extends InstrumentedFragment void addServicesHeader() { if (mNumServices == 0) { - mServicesHeader = (TextView)mInflater.inflate(R.layout.separator_label, + mServicesHeader = (TextView) mInflater.inflate(R.layout.preference_category, mAllDetails, false); mServicesHeader.setText(R.string.runningservicedetails_services_title); mAllDetails.addView(mServicesHeader); @@ -236,7 +236,7 @@ public class RunningServiceDetails extends InstrumentedFragment void addProcessesHeader() { if (mNumProcesses == 0) { - mProcessesHeader = (TextView)mInflater.inflate(R.layout.separator_label, + mProcessesHeader = (TextView) mInflater.inflate(R.layout.preference_category, mAllDetails, false); mProcessesHeader.setText(R.string.runningservicedetails_processes_title); mAllDetails.addView(mProcessesHeader);