diff options
-rwxr-xr-x | res/layout/uninstall_confirm.xml | 4 | ||||
-rwxr-xr-x | res/layout/uninstall_done.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rwxr-xr-x | src/com/android/packageinstaller/UninstallAppDone.java | 1 | ||||
-rwxr-xr-x | src/com/android/packageinstaller/UninstallerActivity.java | 10 |
5 files changed, 15 insertions, 4 deletions
diff --git a/res/layout/uninstall_confirm.xml b/res/layout/uninstall_confirm.xml index 3f7f18a..ef88937 100755 --- a/res/layout/uninstall_confirm.xml +++ b/res/layout/uninstall_confirm.xml @@ -38,7 +38,6 @@ android:id="@+id/uninstall_question" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:text="@string/uninstall_application_question" android:textStyle="bold" android:paddingTop="16dip" android:paddingLeft="16dip" @@ -50,9 +49,8 @@ <!-- uninstall application confirmation text --> <TextView android:id="@+id/uninstall_confirm_text" - android:layout_width="fill_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/uninstall_application_text" android:textColor="?android:attr/textColorSecondary" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_below="@id/uninstall_question" diff --git a/res/layout/uninstall_done.xml b/res/layout/uninstall_done.xml index 082d48b..e65f29f 100755 --- a/res/layout/uninstall_done.xml +++ b/res/layout/uninstall_done.xml @@ -54,6 +54,8 @@ android:paddingRight="6dip" android:layout_alignParentRight="true" android:text="@string/ok" + android.paddingTop="6dip" + android:gravity="center" android:layout_width="150dip" android:layout_height="wrap_content"/> </RelativeLayout> diff --git a/res/values/strings.xml b/res/values/strings.xml index f36660b..67b8e53 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -45,7 +45,9 @@ <string name="app_not_found_dlg_text"> The application was not found in the list of installed applications.</string> <string name="uninstall_application_question">Uninstall application?</string> + <string name="uninstall_update_question">Uninstall update?</string> <string name="uninstall_application_text">This application will be removed from your phone.</string> + <string name="uninstall_update_text">The application update will be uninstalled. You can still use the factory version of the application.</string> <string name="uninstalling">Uninstalling\u2026</string> <string name="uninstall_done">Uninstall finished!</string> <string name="uninstall_failed">Uninstall not successful</string> diff --git a/src/com/android/packageinstaller/UninstallAppDone.java b/src/com/android/packageinstaller/UninstallAppDone.java index 73dffe3..3a9e149 100755 --- a/src/com/android/packageinstaller/UninstallAppDone.java +++ b/src/com/android/packageinstaller/UninstallAppDone.java @@ -51,7 +51,6 @@ public class UninstallAppDone extends Activity implements View.OnClickListener public void initView() { String unknown = getString(R.string.unknown); - requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.uninstall_done); TextView centerText = (TextView)findViewById(R.id.center_text); if(uninstallFlag) { diff --git a/src/com/android/packageinstaller/UninstallerActivity.java b/src/com/android/packageinstaller/UninstallerActivity.java index 0065824..bbc89e8 100755 --- a/src/com/android/packageinstaller/UninstallerActivity.java +++ b/src/com/android/packageinstaller/UninstallerActivity.java @@ -31,6 +31,7 @@ import android.view.View; import android.view.Window; import android.view.View.OnClickListener; import android.widget.Button; +import android.widget.TextView; import android.content.pm.PackageManager.NameNotFoundException; /* @@ -138,6 +139,15 @@ public class UninstallerActivity extends Activity implements OnClickListener { requestWindowFeature(Window.FEATURE_NO_TITLE); //set view setContentView(R.layout.uninstall_confirm); + TextView question = (TextView) findViewById(R.id.uninstall_question); + TextView confirm = (TextView) findViewById(R.id.uninstall_confirm_text); + if ((mAppInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) { + question.setText(R.string.uninstall_update_question); + confirm.setText(R.string.uninstall_update_text); + } else { + question.setText(R.string.uninstall_application_question); + confirm.setText(R.string.uninstall_application_text); + } PackageUtil.initSnippetForInstalledApp(this, mAppInfo, R.id.app_snippet); //initialize ui elements mOk = (Button)findViewById(R.id.ok_button); |