File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
java/com/android/internal/widget Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2626import com .android .internal .view .menu .MenuView ;
2727import com .android .internal .view .menu .SubMenuBuilder ;
2828
29+ import android .animation .LayoutTransition ;
2930import android .app .ActionBar ;
3031import android .app .ActionBar .OnNavigationListener ;
3132import android .app .Activity ;
@@ -1271,12 +1272,19 @@ private static class HomeView extends FrameLayout {
12711272 private ImageView mIconView ;
12721273 private int mUpWidth ;
12731274
1275+ private static final long DEFAULT_TRANSITION_DURATION = 150 ;
1276+
12741277 public HomeView (Context context ) {
12751278 this (context , null );
12761279 }
12771280
12781281 public HomeView (Context context , AttributeSet attrs ) {
12791282 super (context , attrs );
1283+ LayoutTransition t = getLayoutTransition ();
1284+ if (t != null ) {
1285+ // Set a lower duration than the default
1286+ t .setDuration (DEFAULT_TRANSITION_DURATION );
1287+ }
12801288 }
12811289
12821290 public void setUp (boolean isUp ) {
Original file line number Diff line number Diff line change 1818 class =" com.android.internal.widget.ActionBarView$HomeView"
1919 android : layout_width =" wrap_content"
2020 android : layout_height =" match_parent"
21- android : background =" ?android:attr/actionBarItemBackground" >
21+ android : background =" ?android:attr/actionBarItemBackground"
22+ android : animateLayoutChanges =" true" >
2223 <ImageView android : id =" @android:id/up"
2324 android : src =" ?android:attr/homeAsUpIndicator"
2425 android : layout_gravity =" center_vertical|start"
You can’t perform that action at this time.
0 commit comments