Loading packages/PrintSpooler/res/drawable/ic_savetopdf.xmldeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 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. --> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_menu_savetopdf" android:tint="@color/promoted_action_background_color" /> packages/PrintSpooler/res/layout/print_activity_controls.xml +209 −235 Original line number Diff line number Diff line Loading @@ -216,44 +216,18 @@ <!-- More options --> <LinearLayout android:id="@+id/more_options_container" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingStart="28dip" android:paddingEnd="28dip" android:orientation="vertical" android:visibility="visible"> <ImageView android:layout_width="fill_parent" android:layout_height="1dip" android:layout_gravity="fill_horizontal" android:background="?android:attr/colorControlNormal" android:contentDescription="@null"> </ImageView> <Button android:id="@+id/more_options_button" style="?android:attr/borderlessButtonStyle" android:layout_width="fill_parent" android:textColor="?android:attr/textColorPrimary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="fill_horizontal" android:layout_marginStart="16dip" android:layout_marginEnd="16dip" android:text="@string/more_options_button" android:gravity="start|center_vertical" android:textAllCaps="false"> android:gravity="start|center_vertical"> </Button> <ImageView android:layout_width="fill_parent" android:layout_height="1dip" android:layout_gravity="fill_horizontal" android:background="?android:attr/colorControlNormal" android:contentDescription="@null"> </ImageView> </LinearLayout> </LinearLayout> <!-- Expand/collapse handle --> Loading packages/PrintSpooler/res/layout/print_error_fragment.xml +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ android:id="@+id/message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dip" android:layout_marginEnd="16dip" android:gravity="center_horizontal" android:text="@string/print_error_default_message" android:textAppearance="?android:attr/textAppearanceLargeInverse"> </TextView> Loading packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +4 −7 Original line number Diff line number Diff line Loading @@ -180,8 +180,6 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat private TextView mSummaryCopies; private TextView mSummaryPaperSize; private View mAdvancedPrintOptionsContainer; private Button mMoreOptionsButton; private ImageView mPrintButton; Loading Loading @@ -1024,7 +1022,6 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat mPageRangeEditText.addTextChangedListener(new RangeTextWatcher()); // Advanced options button. mAdvancedPrintOptionsContainer = findViewById(R.id.more_options_container); mMoreOptionsButton = (Button) findViewById(R.id.more_options_button); mMoreOptionsButton.setOnClickListener(clickListener); Loading Loading @@ -1294,10 +1291,10 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat ComponentName serviceName = mCurrentPrinter.getId().getServiceName(); if (!TextUtils.isEmpty(PrintOptionUtils.getAdvancedOptionsActivityName( this, serviceName))) { mAdvancedPrintOptionsContainer.setVisibility(View.VISIBLE); mMoreOptionsButton.setVisibility(View.VISIBLE); mMoreOptionsButton.setEnabled(true); } else { mAdvancedPrintOptionsContainer.setVisibility(View.GONE); mMoreOptionsButton.setVisibility(View.GONE); mMoreOptionsButton.setEnabled(false); } Loading Loading @@ -1704,7 +1701,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat if (position == 0 && getPdfPrinter() != null) { PrinterHolder printerHolder = (PrinterHolder) getItem(position); title = printerHolder.printer.getName(); icon = getResources().getDrawable(R.drawable.ic_savetopdf); icon = getResources().getDrawable(R.drawable.ic_menu_savetopdf); } else if (position == 1) { title = getString(R.string.all_printers); } Loading @@ -1712,7 +1709,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat if (position == 1 && getPdfPrinter() != null) { PrinterHolder printerHolder = (PrinterHolder) getItem(position); title = printerHolder.printer.getName(); icon = getResources().getDrawable(R.drawable.ic_savetopdf); icon = getResources().getDrawable(R.drawable.ic_menu_savetopdf); } else if (position == getCount() - 1) { title = getString(R.string.all_printers); } else { Loading packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java +9 −9 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis private View mDraggableContent; private View mPrintButton; private ViewGroup mMoreOptionsContainer; private View mMoreOptionsButton; private ViewGroup mOptionsContainer; private View mEmbeddedContentContainer; Loading Loading @@ -140,7 +140,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mDynamicContent = findViewById(R.id.dynamic_content); mDraggableContent = findViewById(R.id.draggable_content); mPrintButton = findViewById(R.id.print_button); mMoreOptionsContainer = (ViewGroup) findViewById(R.id.more_options_container); mMoreOptionsButton = findViewById(R.id.more_options_button); mOptionsContainer = (ViewGroup) findViewById(R.id.options_container); mEmbeddedContentContainer = findViewById(R.id.embedded_content_container); mEmbeddedContentScrim = findViewById(R.id.embedded_content_scrim); Loading Loading @@ -301,14 +301,14 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis || (mDragProgress == 1.0f && progress < 1.0f)) { mSummaryContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mDraggableContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mMoreOptionsContainer.setLayerType(View.LAYER_TYPE_HARDWARE, null); mMoreOptionsButton.setLayerType(View.LAYER_TYPE_HARDWARE, null); ensureImeClosedAndInputFocusCleared(); } if ((mDragProgress > 0 && progress == 0) || (mDragProgress < 1.0f && progress == 1.0f)) { mSummaryContent.setLayerType(View.LAYER_TYPE_NONE, null); mDraggableContent.setLayerType(View.LAYER_TYPE_NONE, null); mMoreOptionsContainer.setLayerType(View.LAYER_TYPE_NONE, null); mMoreOptionsButton.setLayerType(View.LAYER_TYPE_NONE, null); } mDragProgress = progress; Loading @@ -317,7 +317,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis final float inverseAlpha = 1.0f - progress; mOptionsContainer.setAlpha(inverseAlpha); mMoreOptionsContainer.setAlpha(inverseAlpha); mMoreOptionsButton.setAlpha(inverseAlpha); mEmbeddedContentScrim.setBackgroundColor(computeScrimColor()); Loading @@ -336,8 +336,8 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis if (mOptionsStateChangeListener != null) { mOptionsStateChangeListener.onOptionsClosed(); } if (mMoreOptionsContainer.getVisibility() != View.GONE) { mMoreOptionsContainer.setVisibility(View.INVISIBLE); if (mMoreOptionsButton.getVisibility() != View.GONE) { mMoreOptionsButton.setVisibility(View.INVISIBLE); } mDraggableContent.setVisibility(View.INVISIBLE); // If we change the scrim visibility the dimming is lagging Loading @@ -346,8 +346,8 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mEmbeddedContentScrim.setClickable(false); mExpandCollapseIcon.setBackgroundResource(R.drawable.ic_expand_more); } else { if (mMoreOptionsContainer.getVisibility() != View.GONE) { mMoreOptionsContainer.setVisibility(View.VISIBLE); if (mMoreOptionsButton.getVisibility() != View.GONE) { mMoreOptionsButton.setVisibility(View.VISIBLE); } mDraggableContent.setVisibility(View.VISIBLE); } Loading Loading
packages/PrintSpooler/res/drawable/ic_savetopdf.xmldeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 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. --> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_menu_savetopdf" android:tint="@color/promoted_action_background_color" />
packages/PrintSpooler/res/layout/print_activity_controls.xml +209 −235 Original line number Diff line number Diff line Loading @@ -216,44 +216,18 @@ <!-- More options --> <LinearLayout android:id="@+id/more_options_container" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingStart="28dip" android:paddingEnd="28dip" android:orientation="vertical" android:visibility="visible"> <ImageView android:layout_width="fill_parent" android:layout_height="1dip" android:layout_gravity="fill_horizontal" android:background="?android:attr/colorControlNormal" android:contentDescription="@null"> </ImageView> <Button android:id="@+id/more_options_button" style="?android:attr/borderlessButtonStyle" android:layout_width="fill_parent" android:textColor="?android:attr/textColorPrimary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="fill_horizontal" android:layout_marginStart="16dip" android:layout_marginEnd="16dip" android:text="@string/more_options_button" android:gravity="start|center_vertical" android:textAllCaps="false"> android:gravity="start|center_vertical"> </Button> <ImageView android:layout_width="fill_parent" android:layout_height="1dip" android:layout_gravity="fill_horizontal" android:background="?android:attr/colorControlNormal" android:contentDescription="@null"> </ImageView> </LinearLayout> </LinearLayout> <!-- Expand/collapse handle --> Loading
packages/PrintSpooler/res/layout/print_error_fragment.xml +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ android:id="@+id/message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="16dip" android:layout_marginEnd="16dip" android:gravity="center_horizontal" android:text="@string/print_error_default_message" android:textAppearance="?android:attr/textAppearanceLargeInverse"> </TextView> Loading
packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +4 −7 Original line number Diff line number Diff line Loading @@ -180,8 +180,6 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat private TextView mSummaryCopies; private TextView mSummaryPaperSize; private View mAdvancedPrintOptionsContainer; private Button mMoreOptionsButton; private ImageView mPrintButton; Loading Loading @@ -1024,7 +1022,6 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat mPageRangeEditText.addTextChangedListener(new RangeTextWatcher()); // Advanced options button. mAdvancedPrintOptionsContainer = findViewById(R.id.more_options_container); mMoreOptionsButton = (Button) findViewById(R.id.more_options_button); mMoreOptionsButton.setOnClickListener(clickListener); Loading Loading @@ -1294,10 +1291,10 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat ComponentName serviceName = mCurrentPrinter.getId().getServiceName(); if (!TextUtils.isEmpty(PrintOptionUtils.getAdvancedOptionsActivityName( this, serviceName))) { mAdvancedPrintOptionsContainer.setVisibility(View.VISIBLE); mMoreOptionsButton.setVisibility(View.VISIBLE); mMoreOptionsButton.setEnabled(true); } else { mAdvancedPrintOptionsContainer.setVisibility(View.GONE); mMoreOptionsButton.setVisibility(View.GONE); mMoreOptionsButton.setEnabled(false); } Loading Loading @@ -1704,7 +1701,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat if (position == 0 && getPdfPrinter() != null) { PrinterHolder printerHolder = (PrinterHolder) getItem(position); title = printerHolder.printer.getName(); icon = getResources().getDrawable(R.drawable.ic_savetopdf); icon = getResources().getDrawable(R.drawable.ic_menu_savetopdf); } else if (position == 1) { title = getString(R.string.all_printers); } Loading @@ -1712,7 +1709,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat if (position == 1 && getPdfPrinter() != null) { PrinterHolder printerHolder = (PrinterHolder) getItem(position); title = printerHolder.printer.getName(); icon = getResources().getDrawable(R.drawable.ic_savetopdf); icon = getResources().getDrawable(R.drawable.ic_menu_savetopdf); } else if (position == getCount() - 1) { title = getString(R.string.all_printers); } else { Loading
packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java +9 −9 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis private View mDraggableContent; private View mPrintButton; private ViewGroup mMoreOptionsContainer; private View mMoreOptionsButton; private ViewGroup mOptionsContainer; private View mEmbeddedContentContainer; Loading Loading @@ -140,7 +140,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mDynamicContent = findViewById(R.id.dynamic_content); mDraggableContent = findViewById(R.id.draggable_content); mPrintButton = findViewById(R.id.print_button); mMoreOptionsContainer = (ViewGroup) findViewById(R.id.more_options_container); mMoreOptionsButton = findViewById(R.id.more_options_button); mOptionsContainer = (ViewGroup) findViewById(R.id.options_container); mEmbeddedContentContainer = findViewById(R.id.embedded_content_container); mEmbeddedContentScrim = findViewById(R.id.embedded_content_scrim); Loading Loading @@ -301,14 +301,14 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis || (mDragProgress == 1.0f && progress < 1.0f)) { mSummaryContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mDraggableContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mMoreOptionsContainer.setLayerType(View.LAYER_TYPE_HARDWARE, null); mMoreOptionsButton.setLayerType(View.LAYER_TYPE_HARDWARE, null); ensureImeClosedAndInputFocusCleared(); } if ((mDragProgress > 0 && progress == 0) || (mDragProgress < 1.0f && progress == 1.0f)) { mSummaryContent.setLayerType(View.LAYER_TYPE_NONE, null); mDraggableContent.setLayerType(View.LAYER_TYPE_NONE, null); mMoreOptionsContainer.setLayerType(View.LAYER_TYPE_NONE, null); mMoreOptionsButton.setLayerType(View.LAYER_TYPE_NONE, null); } mDragProgress = progress; Loading @@ -317,7 +317,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis final float inverseAlpha = 1.0f - progress; mOptionsContainer.setAlpha(inverseAlpha); mMoreOptionsContainer.setAlpha(inverseAlpha); mMoreOptionsButton.setAlpha(inverseAlpha); mEmbeddedContentScrim.setBackgroundColor(computeScrimColor()); Loading @@ -336,8 +336,8 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis if (mOptionsStateChangeListener != null) { mOptionsStateChangeListener.onOptionsClosed(); } if (mMoreOptionsContainer.getVisibility() != View.GONE) { mMoreOptionsContainer.setVisibility(View.INVISIBLE); if (mMoreOptionsButton.getVisibility() != View.GONE) { mMoreOptionsButton.setVisibility(View.INVISIBLE); } mDraggableContent.setVisibility(View.INVISIBLE); // If we change the scrim visibility the dimming is lagging Loading @@ -346,8 +346,8 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mEmbeddedContentScrim.setClickable(false); mExpandCollapseIcon.setBackgroundResource(R.drawable.ic_expand_more); } else { if (mMoreOptionsContainer.getVisibility() != View.GONE) { mMoreOptionsContainer.setVisibility(View.VISIBLE); if (mMoreOptionsButton.getVisibility() != View.GONE) { mMoreOptionsButton.setVisibility(View.VISIBLE); } mDraggableContent.setVisibility(View.VISIBLE); } Loading