Search in sources :

Example 86 with LayoutTransition

use of android.animation.LayoutTransition in project android_frameworks_base by crdroidandroid.

the class NavigationBarView method setDisabledFlags.

public void setDisabledFlags(int disabledFlags, boolean force) {
    if (!force && mDisabledFlags == disabledFlags)
        return;
    mDisabledFlags = disabledFlags;
    final boolean disableHome = ((disabledFlags & View.STATUS_BAR_DISABLE_HOME) != 0);
    // Always disable recents when alternate car mode UI is active.
    boolean disableRecent = mUseCarModeUi || ((disabledFlags & View.STATUS_BAR_DISABLE_RECENT) != 0);
    final boolean disableBack = ((disabledFlags & View.STATUS_BAR_DISABLE_BACK) != 0) && ((mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) == 0);
    final boolean disableSearch = ((disabledFlags & View.STATUS_BAR_DISABLE_SEARCH) != 0);
    ViewGroup navButtons = (ViewGroup) getCurrentView().findViewById(R.id.nav_buttons);
    if (navButtons != null) {
        LayoutTransition lt = navButtons.getLayoutTransition();
        if (lt != null) {
            if (!lt.getTransitionListeners().contains(mTransitionListener)) {
                lt.addTransitionListener(mTransitionListener);
            }
        }
    }
    if (inLockTask() && disableRecent && !disableHome) {
        // Don't hide recents when in lock task, it is used for exiting.
        // Unless home is hidden, then in DPM locked mode and no exit available.
        disableRecent = false;
    }
    getBackButton().setVisibility(disableBack ? View.INVISIBLE : View.VISIBLE);
    getHomeButton().setVisibility(disableHome ? View.INVISIBLE : View.VISIBLE);
    getRecentsButton().setVisibility(disableRecent ? View.INVISIBLE : View.VISIBLE);
    getSearchButton().setVisibility(disableSearch ? View.INVISIBLE : View.VISIBLE);
}
Also used : ViewGroup(android.view.ViewGroup) LayoutTransition(android.animation.LayoutTransition)

Example 87 with LayoutTransition

use of android.animation.LayoutTransition in project little-bear-dictionary by daimajia.

the class FragmentBreadCrumbs method setActivity.

@SuppressLint("NewApi")
public void setActivity(FragmentActivity a) {
    mActivity = a;
    mInflater = LayoutInflater.from(a);
    mContainer = (LinearLayout) mInflater.inflate(R.layout.fragment_bread_crumbs, this, false);
    addView(mContainer);
    a.getSupportFragmentManager().addOnBackStackChangedListener(this);
    updateCrumbs();
    if (VERSION.SDK_INT >= 11) {
        setLayoutTransition(new LayoutTransition());
    }
}
Also used : LayoutTransition(android.animation.LayoutTransition) SuppressLint(android.annotation.SuppressLint)

Aggregations

LayoutTransition (android.animation.LayoutTransition)87 ViewGroup (android.view.ViewGroup)36 AnimationThread (android.animation.AnimationThread)18 View (android.view.View)18 Result (com.android.ide.common.rendering.api.Result)18 AdapterView (android.widget.AdapterView)13 ListView (android.widget.ListView)13 AbsListView (android.widget.AbsListView)12 ExpandableListView (android.widget.ExpandableListView)12 ActionMenuView (android.widget.ActionMenuView)10 ActionMenuItemView (com.android.internal.view.menu.ActionMenuItemView)10 IconMenuItemView (com.android.internal.view.menu.IconMenuItemView)10 ListMenuItemView (com.android.internal.view.menu.ListMenuItemView)10 MenuView (com.android.internal.view.menu.MenuView)10 Paint (android.graphics.Paint)8 TypedArray (android.content.res.TypedArray)7 LayoutParams (android.view.ViewGroup.LayoutParams)7 MarginLayoutParams (android.view.ViewGroup.MarginLayoutParams)7 TransitionListener (android.animation.LayoutTransition.TransitionListener)6 BridgeContext (com.android.layoutlib.bridge.android.BridgeContext)6