本文整理匯總了Java中android.animation.LayoutTransition.disableTransitionType方法的典型用法代碼示例。如果您正苦於以下問題:Java LayoutTransition.disableTransitionType方法的具體用法?Java LayoutTransition.disableTransitionType怎麽用?Java LayoutTransition.disableTransitionType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.animation.LayoutTransition
的用法示例。
在下文中一共展示了LayoutTransition.disableTransitionType方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setupLayoutTransition
import android.animation.LayoutTransition; //導入方法依賴的package包/類
private void setupLayoutTransition() {
// We want to show layout transitions when pages are deleted, to close the gap.
mLayoutTransition = new LayoutTransition();
mLayoutTransition.enableTransitionType(LayoutTransition.DISAPPEARING);
mLayoutTransition.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
mLayoutTransition.disableTransitionType(LayoutTransition.APPEARING);
mLayoutTransition.disableTransitionType(LayoutTransition.CHANGE_APPEARING);
setLayoutTransition(mLayoutTransition);
}
示例2: setLayoutTransition
import android.animation.LayoutTransition; //導入方法依賴的package包/類
private void setLayoutTransition(ViewGroup viewGroup) {
if (Build.VERSION.SDK_INT >= 16) {
// 14+ will crash when we remove child, because we cannot disable APPEARING & DISAPPEARING
// it's a big joke
// TODO: work around it
LayoutTransition lt = new LayoutTransition();
if (Build.VERSION.SDK_INT >= 16) {
lt.disableTransitionType(LayoutTransition.APPEARING);
lt.enableTransitionType(LayoutTransition.CHANGING);
lt.disableTransitionType(LayoutTransition.DISAPPEARING);
lt.enableTransitionType(LayoutTransition.CHANGE_APPEARING);
lt.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
}
viewGroup.setLayoutTransition(lt);
}
}
示例3: disableLayoutTransitions
import android.animation.LayoutTransition; //導入方法依賴的package包/類
private void disableLayoutTransitions() {
LayoutTransition transition = getLayoutTransition();
transition.disableTransitionType(LayoutTransition.APPEARING);
transition.disableTransitionType(LayoutTransition.DISAPPEARING);
transition.disableTransitionType(LayoutTransition.CHANGE_APPEARING);
transition.disableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
}
示例4: getDisabledLayoutTransition
import android.animation.LayoutTransition; //導入方法依賴的package包/類
public static LayoutTransition getDisabledLayoutTransition() {
if (Build.VERSION.SDK_INT > 10) {
LayoutTransition layoutTransition = new LayoutTransition();
if (Build.VERSION.SDK_INT >= 17) {
layoutTransition.disableTransitionType(LayoutTransition.DISAPPEARING);
}
return layoutTransition;
}
return null;
}
示例5: onCreateView
import android.animation.LayoutTransition; //導入方法依賴的package包/類
@Override
protected View onCreateView(ViewGroup parent) {
preferenceView = super.onCreateView(parent);
View summary = preferenceView.findViewById(android.R.id.summary);
if (summary != null) {
ViewParent summaryParent = summary.getParent();
if (summaryParent instanceof ViewGroup) {
final LayoutInflater layoutInflater =
(LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
ViewGroup summaryParent2 = (ViewGroup) summaryParent;
layoutInflater.inflate(R.layout.clock_layout_preference, summaryParent2, true);
RelativeLayout previewContainer = (RelativeLayout) summaryParent2.findViewById(R.id.previewContainer);
clockLayout = (ClockLayout) summaryParent2.findViewById(R.id.clockLayout);
textViewPurchaseHint = (TextView) summaryParent2.findViewById(R.id.textViewPurchaseHint);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
LayoutTransition lt = new LayoutTransition();
lt.disableTransitionType(LayoutTransition.CHANGING);
previewContainer.setLayoutTransition(lt);
}
}
}
return preferenceView;
}