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

Commit deffadeb authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Freshen restored stacks, more UX bug fixes.

When restoring a persisted stack, such as last location or a location
where save occurred, freshen the DocumentStack to get the latest
details from backend, and ensure the path is still valid.

Filter Recent directories in create mode based on roots allowed by
incoming request.

Remember when user last picked an external app, and open drawer next
time user launches for GET_CONTENT.

Fix state list drawable ordering, and avoid clobbering Drawable
callback when wrapping in InsetDrawable; tricksy hobbitses!

Make grid items smaller to always fit two columns on phones.  Draw
grid items all the way to screen edge; don't clip to padding.  Better
error message when folder creation failed.  Show Recents in grid mode
when picking any visual content, not just images.

Bug: 10846100, 10903211, 10898993, 10892808, 10892058, 10892009, 10885012
Change-Id: Ia0f88d911abc6ea03645d6fd3e04271c21d5936a
parent b180a65d
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -16,18 +16,16 @@

<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_enabled="false" android:state_selected="true" android:drawable="@*android:drawable/list_selector_disabled_holo_light" />
    <item android:state_enabled="false" android:state_focused="true"  android:drawable="@*android:drawable/list_selector_disabled_holo_light" />
    <item android:state_enabled="false" android:state_pressed="true"  android:drawable="@*android:drawable/list_selector_disabled_holo_light" />
    <item android:state_window_focused="false" android:drawable="@android:color/transparent" />

    <item android:state_activated="true" android:state_pressed="true" android:drawable="@*android:drawable/list_activated_holo" />
    <item android:state_activated="true" android:drawable="@*android:drawable/list_activated_holo" />
    <item android:state_focused="true"   android:state_activated="true" android:drawable="@*android:drawable/list_selected_holo_light" />
    <item android:state_focused="false"  android:state_activated="true" android:drawable="@*android:drawable/list_selected_holo_light" />

    <item android:state_focused="true"  android:state_enabled="false" android:state_pressed="true" android:drawable="@*android:drawable/list_selector_disabled_holo_light" />
    <item android:state_focused="true"  android:state_enabled="false"                              android:drawable="@*android:drawable/list_selector_disabled_holo_light" />
    <item android:state_focused="true"                                android:state_pressed="true" android:drawable="@*android:drawable/list_selector_background_transition_holo_light" />
    <item android:state_focused="false"                               android:state_pressed="true" android:drawable="@*android:drawable/list_selector_background_transition_holo_light" />
    <item android:state_focused="true"                                                             android:drawable="@*android:drawable/list_focused_holo" />
    <item android:state_selected="true" android:drawable="@*android:drawable/list_focused_holo" />

    <item android:state_pressed="true" android:state_focused="true" android:drawable="@*android:drawable/list_selector_background_transition_holo_light" />
    <item android:state_pressed="true" android:drawable="@*android:drawable/list_selector_background_transition_holo_light" />

    <item android:drawable="@android:color/transparent" />

+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
        android:paddingEnd="@dimen/grid_padding_horiz"
        android:paddingTop="@dimen/grid_padding"
        android:paddingBottom="@dimen/grid_padding"
        android:clipToPadding="false"
        android:scrollbarStyle="outsideOverlay"
        android:listSelector="@android:color/transparent"
        android:visibility="gone" />
+2 −2
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
<resources>
    <dimen name="icon_size">32dp</dimen>
    <dimen name="root_icon_size">24dp</dimen>
    <dimen name="grid_width">180dp</dimen>
    <dimen name="grid_height">180dp</dimen>
    <dimen name="grid_width">160dp</dimen>
    <dimen name="grid_height">170dp</dimen>

    <dimen name="grid_padding">4dp</dimen>
    <dimen name="grid_padding_horiz">4dp</dimen>
+2 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@

    <!-- Toast shown when saving a document failed with an error [CHAR LIMIT=48] -->
    <string name="save_error">Failed to save document</string>
    <!-- Toast shown when creating a folder failed with an error [CHAR LIMIT=48] -->
    <string name="create_error">Failed to create folder</string>

    <!-- Title of storage root location that contains recently modified or used documents [CHAR LIMIT=24] -->
    <string name="root_recent">Recent</string>
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ public class CreateDirectoryFragment extends DialogFragment {
                    final DocumentInfo childDoc = DocumentInfo.fromUri(resolver, childUri);
                    activity.onDocumentPicked(childDoc);
                } catch (Exception e) {
                    Toast.makeText(context, R.string.save_error, Toast.LENGTH_SHORT).show();
                    Toast.makeText(context, R.string.create_error, Toast.LENGTH_SHORT).show();
                }
            }
        });
Loading