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

Commit 476136af authored by Tony Huang's avatar Tony Huang Committed by Android (Google) Code Review
Browse files

Merge "Update new UI/UX for open document tree"

parents c0968701 0aaf9660
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@
    android:orientation="horizontal"
    android:baselineAligned="false"
    android:gravity="center_vertical|end"
    android:paddingEnd="@dimen/bottom_bar_padding_end">
    android:paddingStart="@dimen/bottom_bar_padding"
    android:paddingEnd="@dimen/bottom_bar_padding">

    <com.google.android.material.button.MaterialButton
        android:id="@android:id/button2"
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    android:layout_width="match_parent"
    android:layout_height="@dimen/bottom_bar_height"
    android:paddingStart="@dimen/list_item_padding"
    android:paddingEnd="@dimen/bottom_bar_padding_end"
    android:paddingEnd="@dimen/bottom_bar_padding"
    android:orientation="horizontal"
    android:baselineAligned="false"
    android:gravity="center_vertical"
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@
    <dimen name="fastscroll_margin">0dp</dimen>

    <dimen name="bottom_bar_height">56dp</dimen>
    <dimen name="bottom_bar_padding_end">10dp</dimen>
    <dimen name="bottom_bar_padding">10dp</dimen>
    <dimen name="bottom_bar_button_height">36dip</dimen>
    <dimen name="bottom_bar_button_horizontal_padding">24dp</dimen>
    <dimen name="bottom_bar_button_corner_radius">4dp</dimen>
+9 −0
Original line number Diff line number Diff line
@@ -442,4 +442,13 @@

    <!-- Apps row title. [CHAR_LIMIT=60] -->
    <string name="apps_row_title">Browse files in other apps</string>

    <!-- The default name to present the anonymous application-->
    <string name="anonymous_application">Anonymous</string>
    <!-- Button text show on open document tree flow. [CHAR_LIMIT=48] -->
    <string name="open_tree_button">Allow access to \"<xliff:g id="directory" example="DCIM">%1$s</xliff:g>\"</string>
    <!-- Confrim dialog title show on open document tree flow. [CHAR_LIMIT=60] -->
    <string name="open_tree_dialog_title">Allow access to \"<xliff:g id="directory" example="DCIM">%1$s</xliff:g>\" on \"<xliff:g id="root" example="SD card">%2$s</xliff:g>\"?</string>
    <!-- Confrim dialog message show on open document tree flow.-->
    <string name="open_tree_dialog_message">It will allow \"<xliff:g id="appName" example="Drive">%1$s</xliff:g>\" to have full access to all files currently stored under this location, and any future content stored here.</string>
</resources>
+18 −2
Original line number Diff line number Diff line
@@ -459,6 +459,8 @@ public abstract class BaseActivity

        mState.derivedMode = LocalPreferences.getViewMode(this, mState.stack.getRoot(), MODE_GRID);

        mNavigator.update();

        refreshDirectory(anim);

        final RootsFragment roots = RootsFragment.get(getSupportFragmentManager());
@@ -466,8 +468,6 @@ public abstract class BaseActivity
            roots.onCurrentRootChanged();
        }

        mNavigator.update();

        // Causes talkback to announce the activity's new title
        setTitle(mState.stack.getTitle());

@@ -624,6 +624,22 @@ public abstract class BaseActivity
        }
    }

    /**
     * Get title string equal to the string action bar displayed.
     * @return current directory title name
     */
    public String getCurrentTitle() {
        if (!mState.stack.isInitialized()) {
            return null;
        }

        if (mState.stack.size() > 1) {
            return getCurrentDirectory().displayName;
        } else {
            return getCurrentRoot().title;
        }
    }

    @Override
    protected void onSaveInstanceState(Bundle state) {
        super.onSaveInstanceState(state);
Loading