From 3c03f0a8a887ef48e35e49e546843812c2b0a51c Mon Sep 17 00:00:00 2001 From: Edgar Wang Date: Tue, 5 May 2020 06:19:14 +0800 Subject: [PATCH] Change AppPicker theme from dialog to full screen AppPicker used in devceloper options, it will show apps list with package name in a dialog. But sometimes it will mis-alignment with package name. So we change theme from dialog to full screen and set widget_frame visibility to GONE. Bug: 151150544 Test: manual Change-Id: I8f04ab7967288801e5e13ecccf037d6ed09ec71c --- AndroidManifest.xml | 3 +-- .../settings/development/AppPicker.java | 21 +++++++++++++++++++ .../settings/development/AppViewHolder.java | 2 ++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index a6ba436ac0c..643f85cee36 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1981,8 +1981,7 @@ + android:label="@string/select_application" /> 1) { + super.onBackPressed(); + } else { + setResult(RESULT_CANCELED); + finish(); + } + } + class MyApplicationInfo { ApplicationInfo info; CharSequence label; @@ -162,6 +182,7 @@ public class AppPicker extends ListActivity { holder.summary.setText(""); } holder.disabled.setVisibility(View.GONE); + holder.widget.setVisibility(View.GONE); return convertView; } } diff --git a/src/com/android/settings/development/AppViewHolder.java b/src/com/android/settings/development/AppViewHolder.java index 1082efe38ce..4deef904787 100644 --- a/src/com/android/settings/development/AppViewHolder.java +++ b/src/com/android/settings/development/AppViewHolder.java @@ -32,6 +32,7 @@ public class AppViewHolder { public ImageView appIcon; public TextView summary; public TextView disabled; + public View widget; static public AppViewHolder createOrRecycle(LayoutInflater inflater, View convertView) { if (convertView == null) { @@ -45,6 +46,7 @@ public class AppViewHolder { holder.appIcon = convertView.findViewById(android.R.id.icon); holder.summary = convertView.findViewById(android.R.id.summary); holder.disabled = convertView.findViewById(R.id.appendix); + holder.widget = convertView.findViewById(android.R.id.widget_frame); convertView.setTag(holder); return holder; } else {