use of android.animation.LayoutTransition in project HoloEverywhere by Prototik.
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());
}
}
use of android.animation.LayoutTransition in project android_frameworks_base by crdroidandroid.
the class MLand method setScoreFieldHolder.
public void setScoreFieldHolder(ViewGroup vg) {
mScoreFields = vg;
if (vg != null) {
final LayoutTransition lt = new LayoutTransition();
lt.setDuration(250);
mScoreFields.setLayoutTransition(lt);
}
for (Player p : mPlayers) {
mScoreFields.addView(p.mScoreField, new MarginLayoutParams(MarginLayoutParams.WRAP_CONTENT, MarginLayoutParams.MATCH_PARENT));
}
}
use of android.animation.LayoutTransition in project android_frameworks_base by crdroidandroid.
the class NavigationBarView method updateLayoutTransitionsEnabled.
private void updateLayoutTransitionsEnabled() {
boolean enabled = !mWakeAndUnlocking && mLayoutTransitionsEnabled;
ViewGroup navButtons = (ViewGroup) getCurrentView().findViewById(R.id.nav_buttons);
LayoutTransition lt = navButtons.getLayoutTransition();
if (lt != null) {
if (enabled) {
lt.enableTransitionType(LayoutTransition.APPEARING);
lt.enableTransitionType(LayoutTransition.DISAPPEARING);
lt.enableTransitionType(LayoutTransition.CHANGE_APPEARING);
lt.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
} else {
lt.disableTransitionType(LayoutTransition.APPEARING);
lt.disableTransitionType(LayoutTransition.DISAPPEARING);
lt.disableTransitionType(LayoutTransition.CHANGE_APPEARING);
lt.disableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
}
}
}
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);
}
use of android.animation.LayoutTransition in project android_frameworks_base by crdroidandroid.
the class FragmentBreadCrumbs method setActivity.
/**
* Attach the bread crumbs to their activity. This must be called once
* when creating the bread crumbs.
*/
public void setActivity(Activity a) {
mActivity = a;
mInflater = (LayoutInflater) a.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mContainer = (LinearLayout) mInflater.inflate(com.android.internal.R.layout.fragment_bread_crumbs, this, false);
addView(mContainer);
a.getFragmentManager().addOnBackStackChangedListener(this);
updateCrumbs();
setLayoutTransition(new LayoutTransition());
}
Aggregations