Redo the empty states in print settings
In the end the UI does not change but the new states: - Are similar to the "empty" states we use in the print spooler - Use the system print icon - Use a translucent background icon which works correctly with dark mode Test: Looked at all changed Settings pages Fixes: 115830412 Change-Id: I1f5b005674e7072e989355f01ebd3fdaf56c9355
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB |
@@ -14,48 +14,40 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/empty_print_state"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:src="@*android:drawable/ic_print"
|
||||
android:scaleType="fitEnd"
|
||||
android:alpha="0.1"
|
||||
android:tint="?android:colorForeground"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dip"
|
||||
android:src="@drawable/ic_grayedout_printer"
|
||||
android:contentDescription="@null">
|
||||
</ImageView>
|
||||
<Button
|
||||
android:id="@+id/add_new_service"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@string/print_menu_item_add_service"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary">
|
||||
</TextView>
|
||||
|
||||
<Button android:id="@+id/add_new_service"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="@string/print_menu_item_add_service"
|
||||
android:textAllCaps="true"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
@@ -14,45 +14,38 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/empty_printers_list_service_enabled"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:visibility="gone">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:src="@*android:drawable/ic_print"
|
||||
android:scaleType="fitEnd"
|
||||
android:alpha="0.1"
|
||||
android:tint="?android:colorForeground"
|
||||
android:importantForAccessibility="no"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@string/print_searching_for_printers"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dip"
|
||||
android:src="@drawable/ic_grayedout_printer"
|
||||
android:importantForAccessibility="no">
|
||||
</ImageView>
|
||||
<ProgressBar
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:importantForAccessibility="no"
|
||||
style="?android:attr/progressBarStyleHorizontal"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:gravity="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@string/print_searching_for_printers">
|
||||
</TextView>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
style="?android:attr/progressBarStyleHorizontal">
|
||||
</ProgressBar>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
@@ -190,8 +190,6 @@ public class PrintServiceSettingsFragment extends SettingsPreferenceFragment
|
||||
if (emptyView == null) {
|
||||
emptyView = getActivity().getLayoutInflater().inflate(
|
||||
R.layout.empty_print_state, contentRoot, false);
|
||||
ImageView iconView = (ImageView) emptyView.findViewById(R.id.icon);
|
||||
iconView.setContentDescription(getString(R.string.print_service_disabled));
|
||||
TextView textView = (TextView) emptyView.findViewById(R.id.message);
|
||||
textView.setText(R.string.print_service_disabled);
|
||||
contentRoot.addView(emptyView);
|
||||
@@ -216,8 +214,6 @@ public class PrintServiceSettingsFragment extends SettingsPreferenceFragment
|
||||
if (emptyView == null) {
|
||||
emptyView = getActivity().getLayoutInflater().inflate(
|
||||
R.layout.empty_print_state, contentRoot, false);
|
||||
ImageView iconView = (ImageView) emptyView.findViewById(R.id.icon);
|
||||
iconView.setContentDescription(getString(R.string.print_no_printers_found));
|
||||
TextView textView = (TextView) emptyView.findViewById(R.id.message);
|
||||
textView.setText(R.string.print_no_printers_found);
|
||||
contentRoot.addView(emptyView);
|
||||
|
Reference in New Issue
Block a user