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

Commit 82cc3fe6 authored by Adam Cohen's avatar Adam Cohen Committed by Android (Google) Code Review
Browse files

Merge "Preliminary work on Material Transitions" into ub-now-master

parents ebf50c93 6c5891a9
Loading
Loading
Loading
Loading
+244 B
Loading image diff...
−1.82 KiB
Loading image diff...
+30 −65
Original line number Diff line number Diff line
@@ -15,47 +15,13 @@
-->
<com.android.launcher3.AppsCustomizeTabHost
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
    android:background="#80FFFFFF">
    <LinearLayout
        android:id="@+id/apps_customize_content"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">
        <!-- The layout_width of the tab bar gets overriden to align the content
             with the text in the tabs in AppsCustomizeTabHost. -->
        <FrameLayout
            android:id="@+id/tabs_container"
            android:layout_width="wrap_content"
            android:layout_height="@dimen/apps_customize_tab_bar_height"
            android:layout_marginTop="@dimen/apps_customize_tab_bar_margin_top"
            android:layout_gravity="center_horizontal"
            android:visibility="gone">
            <com.android.launcher3.FocusOnlyTabWidget
                android:id="@android:id/tabs"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:gravity="start"
                android:background="@drawable/tab_unselected_holo"
                android:tabStripEnabled="false"
                android:divider="@null" />
            <include
                android:id="@+id/market_button"
                layout="@layout/market_button"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="end" />
        </FrameLayout>
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
    xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3">

    <LinearLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipChildren="false"
        android:orientation="vertical">

        <com.android.launcher3.AppsCustomizePagedView
@@ -69,7 +35,6 @@
            launcher:clingFocusedY="@integer/apps_customize_cling_focused_y"
            launcher:maxGap="@dimen/workspace_max_gap"
            launcher:pageIndicator="@+id/apps_customize_page_indicator" />

        <include
            android:id="@+id/apps_customize_page_indicator"
            layout="@layout/page_indicator"
@@ -78,12 +43,12 @@
            android:layout_gravity="center" />
    </LinearLayout>

            <FrameLayout
                android:id="@+id/animation_buffer"
                android:layout_width="match_parent"
    <include
        android:id="@+id/market_button"
        layout="@layout/market_button"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
                android:background="#FF000000"
        android:layout_gravity="end"
        android:visibility="gone"/>
        </FrameLayout>
    </LinearLayout>

</com.android.launcher3.AppsCustomizeTabHost>
+2 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

<!-- AllApps/Customize/AppsCustomize -->
    <!-- The alpha of the AppsCustomize bg in spring loaded mode -->
    <integer name="config_appsCustomizeSpringLoadedBgAlpha">65</integer>
    <integer name="config_workspaceScrimAlpha">55</integer>
    <integer name="config_workspaceUnshrinkTime">300</integer>
    <integer name="config_overviewTransitionTime">250</integer>

@@ -31,6 +31,7 @@

    <!-- Fade/zoom in/out duration & scale in the AllApps transition.
         Note: This should be less than the workspaceShrinkTime as they happen together. -->
    <integer name="config_appsCustomizeRevealTime">350</integer>
    <integer name="config_appsCustomizeZoomInTime">350</integer>
    <integer name="config_appsCustomizeZoomOutTime">600</integer>
    <integer name="config_appsCustomizeZoomScaleFactor">7</integer>
+3 −8
Original line number Diff line number Diff line
@@ -377,8 +377,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
        int heightSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.AT_MOST);
        mWidgetSpacingLayout.measure(widthSpec, heightSpec);

        AppsCustomizeTabHost host = (AppsCustomizeTabHost) getTabHost();
        final boolean hostIsTransitioning = host.isTransitioning();
        final boolean hostIsTransitioning = getTabHost().isInTransition();

        // Restore the page
        int page = getPageForComponent(mSaveInstanceStateItemIndex);
@@ -1617,12 +1616,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
        // If we have reset, then we should not continue to restore the previous state
        mSaveInstanceStateItemIndex = -1;

        AppsCustomizeTabHost tabHost = getTabHost();
        String tag = tabHost.getCurrentTabTag();
        if (tag != null) {
            if (!tag.equals(tabHost.getTabTagForContentType(ContentType.Applications))) {
                tabHost.setCurrentTabFromContent(ContentType.Applications);
            }
        if (mContentType != ContentType.Applications) {
            setContentType(ContentType.Applications);
        }

        if (mCurrentPage != 0) {
Loading