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

Commit 85ec0d67 authored by Steve McKay's avatar Steve McKay
Browse files

Load layout specific breadcrumb view.

Because two diffrn't view types can't share an resource id....
else we get ClassCastExceptions bubbling out of Spinner when
tryihng to restore from RecyclerView state.

Also:
Move Bots to own file and make BaseBot inner to that.
Extract searchbot from UiBot.
Fix broken search icon logic in phone layout.
Separate somewhat complicated breadcrumb bot functioanlity in a separate bot.
Simplify Search test.
Check for drawer vs. fixed layout instead of "tablet" mode...which didn't
    work when rotating tablets.
Update a dialog entry to use Espresso.
Update breadcrumb stuff to use Espresso.
Move *default state* checking to a different test so we can
    enjoy the default location support from ActivityTest.

Change-Id: I0a60ba93a1cbbb990ec3b36d4f9fd5dc8b86ff00
parent ba1cb3dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
                android:popupTheme="?actionBarPopupTheme">

                <com.android.documentsui.DropdownBreadcrumb
                    android:id="@+id/breadcrumb"
                    android:id="@+id/dropdown_breadcrumb"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="4dp"
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
            android:popupTheme="?actionBarPopupTheme">

            <com.android.documentsui.HorizontalBreadcrumb
                android:id="@+id/breadcrumb"
                android:id="@+id/horizontal_breadcrumb"
                android:layout_marginRight="20dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
+0 −18
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->

<resources>
</resources>
+0 −1
Original line number Diff line number Diff line
@@ -17,5 +17,4 @@
<resources>
    <item name="documents_activity" type="layout">@layout/drawer_layout</item>
    <item name="files_activity" type="layout">@layout/drawer_layout</item>
    <item name="downloads_activity" type="layout">@layout/single_pane_layout</item>
</resources>
+5 −1
Original line number Diff line number Diff line
@@ -141,8 +141,12 @@ public abstract class BaseActivity extends Activity
        mSearchManager = new SearchViewManager(this, icicle);

        DocumentsToolbar toolbar = (DocumentsToolbar) findViewById(R.id.toolbar);
        Breadcrumb breadcrumb = (Breadcrumb) findViewById(R.id.breadcrumb);
        setActionBar(toolbar);

        Breadcrumb breadcrumb =
                Shared.findView(this, R.id.dropdown_breadcrumb, R.id.horizontal_breadcrumb);
        assert(breadcrumb != null);

        mNavigator = new NavigationViewManager(mDrawer, toolbar, mState, this, breadcrumb);

        // Base classes must update result in their onCreate.
Loading