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

Commit 77a572a8 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am 60add06f: am 4224790f: Merge "Animate the action bar\'s Up chevron as it...

am 60add06f: am 4224790f: Merge "Animate the action bar\'s Up chevron as it shows and hides." into jb-mr1-dev

* commit '60add06f':
  Animate the action bar's Up chevron as it shows and hides.
parents 1d94cb45 60add06f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import com.android.internal.view.menu.MenuPresenter;
import com.android.internal.view.menu.MenuView;
import com.android.internal.view.menu.SubMenuBuilder;

import android.animation.LayoutTransition;
import android.app.ActionBar;
import android.app.ActionBar.OnNavigationListener;
import android.app.Activity;
@@ -1271,12 +1272,19 @@ public class ActionBarView extends AbsActionBarView {
        private ImageView mIconView;
        private int mUpWidth;

        private static final long DEFAULT_TRANSITION_DURATION = 150;

        public HomeView(Context context) {
            this(context, null);
        }

        public HomeView(Context context, AttributeSet attrs) {
            super(context, attrs);
            LayoutTransition t = getLayoutTransition();
            if (t != null) {
                // Set a lower duration than the default
                t.setDuration(DEFAULT_TRANSITION_DURATION);
            }
        }

        public void setUp(boolean isUp) {
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,8 @@
      class="com.android.internal.widget.ActionBarView$HomeView"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:background="?android:attr/actionBarItemBackground" >
      android:background="?android:attr/actionBarItemBackground"
      android:animateLayoutChanges="true">
    <ImageView android:id="@android:id/up"
               android:src="?android:attr/homeAsUpIndicator"
               android:layout_gravity="center_vertical|start"