From 5ab717f21a2dbcd78fb37d40e31393d129743599 Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Fri, 4 Oct 2013 17:27:33 -0700 Subject: Print UI tweaks. 1. The refresh button in a print notification was using wrong asset. 2. If the page count is unknown, just not show the page count instead unknown. bug:10983508 Change-Id: I15f1fcbff60fe1f30d37868864da41550bb14487 --- packages/PrintSpooler/res/drawable-hdpi/ic_restart.png | Bin 0 -> 3138 bytes packages/PrintSpooler/res/drawable-mdpi/ic_restart.png | Bin 0 -> 3033 bytes packages/PrintSpooler/res/drawable-xhdpi/ic_restart.png | Bin 0 -> 3219 bytes packages/PrintSpooler/res/values/strings.xml | 2 +- .../com/android/printspooler/NotificationController.java | 2 +- .../com/android/printspooler/PrintJobConfigActivity.java | 11 +++++------ 6 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 packages/PrintSpooler/res/drawable-hdpi/ic_restart.png create mode 100644 packages/PrintSpooler/res/drawable-mdpi/ic_restart.png create mode 100644 packages/PrintSpooler/res/drawable-xhdpi/ic_restart.png (limited to 'packages/PrintSpooler') diff --git a/packages/PrintSpooler/res/drawable-hdpi/ic_restart.png b/packages/PrintSpooler/res/drawable-hdpi/ic_restart.png new file mode 100644 index 0000000..bb9d855 Binary files /dev/null and b/packages/PrintSpooler/res/drawable-hdpi/ic_restart.png differ diff --git a/packages/PrintSpooler/res/drawable-mdpi/ic_restart.png b/packages/PrintSpooler/res/drawable-mdpi/ic_restart.png new file mode 100644 index 0000000..bd611e8 Binary files /dev/null and b/packages/PrintSpooler/res/drawable-mdpi/ic_restart.png differ diff --git a/packages/PrintSpooler/res/drawable-xhdpi/ic_restart.png b/packages/PrintSpooler/res/drawable-xhdpi/ic_restart.png new file mode 100644 index 0000000..a7fdc0d Binary files /dev/null and b/packages/PrintSpooler/res/drawable-xhdpi/ic_restart.png differ diff --git a/packages/PrintSpooler/res/values/strings.xml b/packages/PrintSpooler/res/values/strings.xml index 5b947ba..3a888a8 100644 --- a/packages/PrintSpooler/res/values/strings.xml +++ b/packages/PrintSpooler/res/values/strings.xml @@ -56,7 +56,7 @@ Printing app crashed - unavailable + Pages Generating print job diff --git a/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java b/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java index dae7770..2bd0443 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java +++ b/packages/PrintSpooler/src/com/android/printspooler/NotificationController.java @@ -110,7 +110,7 @@ public class NotificationController { printJob.getLabel())) .addAction(R.drawable.stat_notify_cancelling, mContext.getString(R.string.cancel), createCancelIntent(printJob)) - .addAction(android.R.drawable.ic_secure, mContext.getString(R.string.restart), + .addAction(R.drawable.ic_restart, mContext.getString(R.string.restart), createRestartIntent(printJob.getId())) .setContentText(printJob.getPrinterName()) .setWhen(System.currentTimeMillis()) diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java index 293be1b..f1678ff 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java @@ -1862,18 +1862,17 @@ public class PrintJobConfigActivity extends Activity { } } final int pageCount = mDocument.info.getPageCount(); - mRangeOptionsTitle.setText(getString(R.string.label_pages, - (pageCount == PrintDocumentInfo.PAGE_COUNT_UNKNOWN) - ? getString(R.string.page_count_unknown) - : String.valueOf(pageCount))); + String title = (pageCount != PrintDocumentInfo.PAGE_COUNT_UNKNOWN) + ? getString(R.string.label_pages, String.valueOf(pageCount)) + : getString(R.string.page_count_unknown); + mRangeOptionsTitle.setText(title); } else { if (mRangeOptionsSpinner.getSelectedItemPosition() != 0) { mIgnoreNextRangeOptionChange = true; mRangeOptionsSpinner.setSelection(0); } mRangeOptionsSpinner.setEnabled(false); - mRangeOptionsTitle.setText(getString(R.string.label_pages, - getString(R.string.page_count_unknown))); + mRangeOptionsTitle.setText(getString(R.string.page_count_unknown)); mPageRangeEditText.setEnabled(false); mPageRangeEditText.setVisibility(View.INVISIBLE); mPageRangeTitle.setVisibility(View.INVISIBLE); -- cgit v1.1