Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 976b4e63 authored by Svetoslav's avatar Svetoslav
Browse files

Adding an empty state UI for the printer search activity in the spooler.

The user can select all printers from the print dropdown to get to
a search for printers activity where one can filter out the list
of a available printers. We did not have an empty state UI for the
case when the query yields no printers.

bug:11009053

Change-Id: I6b45517b8a7b319992019a1bf65858319a19a0de
parent 0bc0f109
Loading
Loading
Loading
Loading
+3.34 KiB
Loading image diff...
+3.34 KiB
Loading image diff...
+3.34 KiB
Loading image diff...
+1 −0
Original line number Diff line number Diff line
@@ -1041,6 +1041,7 @@
  <java-symbol type="drawable" name="ic_text_dot" />
  <java-symbol type="drawable" name="ic_print" />
  <java-symbol type="drawable" name="ic_print_error" />
  <java-symbol type="drawable" name="ic_grayedout_printer" />
  <java-symbol type="drawable" name="indicator_code_lock_drag_direction_green_up" />
  <java-symbol type="drawable" name="indicator_code_lock_drag_direction_red_up" />
  <java-symbol type="drawable" name="indicator_code_lock_point_area_default_holo" />
+39 −4
Original line number Diff line number Diff line
@@ -14,10 +14,10 @@
     limitations under the License.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    android:layout_height="fill_parent">

    <fragment
        android:name="com.android.printspooler.SelectPrinterFragment"
@@ -26,4 +26,39 @@
        android:layout_height="wrap_content">
    </fragment>

    <FrameLayout
        android:id="@+id/empty_print_state"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:visibility="gone">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:orientation="vertical">
   
            <ImageView
                android:id="@+id/icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="12dip"
                android:src="@*android:drawable/ic_grayedout_printer"
                android:contentDescription="@string/print_no_printers_found">
            </ImageView>

            <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"
                android:text="@string/print_no_printers_found">
            </TextView>

        </LinearLayout>

    </FrameLayout>

</LinearLayout>
Loading