本文整理汇总了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;
}