本文整理汇总了Java中android.animation.LayoutTransition.setStartDelay方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutTransition.setStartDelay方法的具体用法?Java LayoutTransition.setStartDelay怎么用?Java LayoutTransition.setStartDelay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.animation.LayoutTransition
的用法示例。
在下文中一共展示了LayoutTransition.setStartDelay方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.animation.LayoutTransition; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom_layout_animations);
LayoutTransition layoutTransition = new LayoutTransition();
ObjectAnimator appearingAnim = ObjectAnimator.ofFloat(null, "rotationY", 0f, 90f, 180f, 270f, 359.9999f);
appearingAnim.addListener(new AnimatorListenerAdapter() {
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setRotationY(0f);
}
});
layoutTransition.setAnimator(LayoutTransition.APPEARING, appearingAnim);
layoutTransition.setDuration(LayoutTransition.APPEARING, 2000L);
layoutTransition.setStartDelay(LayoutTransition.APPEARING, 0);
gridContainer.setLayoutTransition(layoutTransition);
}
示例2: initView
import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void initView(Context context) {
if (mIndicatorType == 0) {
for (int i = 0; i < mPinLength; i++) {
View dot = new View(context);
emptyDot(dot);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(mDotDiameter,
mDotDiameter);
params.setMargins(mDotSpacing, 0, mDotSpacing, 0);
dot.setLayoutParams(params);
addView(dot);
}
} else if (mIndicatorType == 2) {
LayoutTransition layoutTransition = new LayoutTransition();
layoutTransition.setDuration(DEFAULT_ANIMATION_DURATION);
layoutTransition.setStartDelay(layoutTransition.APPEARING, 0);
setLayoutTransition(layoutTransition);
}
}
示例3: onViewCreated
import android.animation.LayoutTransition; //导入方法依赖的package包/类
@SuppressLint("NewApi") @Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
pin = new StringBuffer();
;
if (Build.VERSION.SDK_INT >= 16) {
int startDelay = 0;
LayoutTransition transition = new LayoutTransition();
transition.enableTransitionType(LayoutTransition.CHANGING);
transition.setStartDelay(LayoutTransition.APPEARING, startDelay);
transition.setStartDelay(LayoutTransition.CHANGE_APPEARING, startDelay);
rootLayout.setLayoutTransition(transition);
}
if (loadingAnimator != null) {
loadingAnimator.cancel();
}
}
示例4: getDefaultTransition
import android.animation.LayoutTransition; //导入方法依赖的package包/类
public static LayoutTransition getDefaultTransition() {
LayoutTransition itemLayoutTransition = new LayoutTransition();
itemLayoutTransition.setStartDelay(LayoutTransition.APPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.DISAPPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.CHANGE_APPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
itemLayoutTransition.setStartDelay(LayoutTransition.CHANGING, 0);
itemLayoutTransition.setDuration(100);
itemLayoutTransition.setInterpolator(LayoutTransition.CHANGING, new OvershootInterpolator(2f));
Animator scaleUp = ObjectAnimator.ofPropertyValuesHolder((Object) null, PropertyValuesHolder.ofFloat(View.SCALE_X, 1, 1), PropertyValuesHolder.ofFloat(View.SCALE_Y, 0, 1));
scaleUp.setDuration(50);
scaleUp.setStartDelay(50);
Animator scaleDown = ObjectAnimator.ofPropertyValuesHolder((Object) null, PropertyValuesHolder.ofFloat(View.SCALE_X, 1, 1), PropertyValuesHolder.ofFloat(View.SCALE_Y, 1, 0));
scaleDown.setDuration(2);
itemLayoutTransition.setAnimator(LayoutTransition.APPEARING, scaleUp);
itemLayoutTransition.setAnimator(LayoutTransition.DISAPPEARING, null);
itemLayoutTransition.enableTransitionType(LayoutTransition.CHANGING);
return itemLayoutTransition;
}
示例5: onViewCreated
import android.animation.LayoutTransition; //导入方法依赖的package包/类
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
loginButton.setMode(ActionProcessButton.Mode.ENDLESS);
int startDelay = getResources().getInteger(android.R.integer.config_mediumAnimTime) + 100;
LayoutTransition transition = new LayoutTransition();
transition.enableTransitionType(LayoutTransition.CHANGING);
transition.setStartDelay(LayoutTransition.APPEARING, startDelay);
transition.setStartDelay(LayoutTransition.CHANGE_APPEARING, startDelay);
loginForm.setLayoutTransition(transition);
}
示例6: setUpLayoutTransition
import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void setUpLayoutTransition() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
RelativeLayout searchRoot = (RelativeLayout) findViewById(R.id.search_root);
LayoutTransition layoutTransition = new LayoutTransition();
layoutTransition.setDuration(DURATION_LAYOUT_TRANSITION);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
// layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
layoutTransition.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
layoutTransition.setStartDelay(LayoutTransition.CHANGING, 0);
}
layoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
mSearchCardView.setLayoutTransition(layoutTransition);
}
}
示例7: initLayoutChangeAnimation
import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void initLayoutChangeAnimation() {
final Animator showAnimation = ObjectAnimator.ofPropertyValuesHolder(PropertyValuesHolder.ofFloat("scaleX", 1, 0));
final Animator hideAnimation = ObjectAnimator.ofPropertyValuesHolder(PropertyValuesHolder.ofFloat("scaleX", 0, 1));
final LayoutTransition layoutTransition = new LayoutTransition();
layoutTransition.setDuration(50);
layoutTransition.setStartDelay(LayoutTransition.CHANGE_APPEARING, 0);
layoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
layoutTransition.setAnimator(LayoutTransition.APPEARING, hideAnimation);
layoutTransition.setAnimator(LayoutTransition.DISAPPEARING, showAnimation);
setLayoutTransition(layoutTransition);
}
示例8: LicensePanelView
import android.animation.LayoutTransition; //导入方法依赖的package包/类
public LicensePanelView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
setOrientation(VERTICAL);
LayoutInflater.from(context).inflate(R.layout.license_panel_view, this, true);
unbinder = ButterKnife.bind(this);
LayoutTransition layoutTransition = getLayoutTransition();
if (layoutTransition != null && Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
// workaround to prevent clipping issues when there is no CHANGING
// animation on the parent layout
layoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
layoutTransition.setAnimator(LayoutTransition.DISAPPEARING, null);
setLayoutTransition(layoutTransition);
}
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LicensePanelView, defStyleAttr, 0);
int nameRes = a.getResourceId(R.styleable.LicensePanelView_name, 0);
String linkString = a.getString(R.styleable.LicensePanelView_link);
int copyrightRes = a.getResourceId(R.styleable.LicensePanelView_copyright, 0);
int noticeRes = a.getResourceId(R.styleable.LicensePanelView_notice, 0);
a.recycle();
setViewTextFromResId(nameView, nameRes);
setViewTextFromResId(copyrightView, copyrightRes);
setViewTextFromResId(noticeView, noticeRes);
if (linkString != null) {
linkView.setOnClickListener(new IntentUtil.URLOpenOnActivityOnClickListener(linkString));
}
// make html links in notice text clickable
noticeView.setMovementMethod(LinkMovementMethod.getInstance());
}
示例9: gol
import android.animation.LayoutTransition; //导入方法依赖的package包/类
public gol(Context paramContext, gom paramgom)
{
super(paramContext);
Resources localResources = getResources();
if (h == -1)
{
h = localResources.getDimensionPixelSize(efj.DT);
a = localResources.getDimensionPixelSize(efj.DU);
b = localResources.getDimensionPixelSize(efj.DW);
}
setOrientation(0);
this.d = new TextView(paramContext);
this.d.setMaxLines(1);
this.d.setEllipsize(TextUtils.TruncateAt.END);
this.c = paramgom.a();
boolean bool;
if (this.c != null)
{
bool = true;
this.g = bool;
this.i = paramgom.c();
this.j = 1;
this.f = paramgom.f();
this.k = paramgom.d();
if (this.g)
{
LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams(h, h);
addView(this.c, localLayoutParams);
}
this.d.setContentDescription(paramgom.e());
this.d.setText(paramgom.b());
this.d.setTextAppearance(paramContext, this.k);
this.d.setGravity(16);
a();
addView(this.d);
if (this.j != 1) {
break label333;
}
setBackgroundResource(efj.Ej);
}
for (;;)
{
((GradientDrawable)getBackground()).setColor(this.i);
LayoutTransition localLayoutTransition = new LayoutTransition();
localLayoutTransition.setDuration(150L);
localLayoutTransition.setStartDelay(0, 0L);
localLayoutTransition.setStartDelay(1, 0L);
localLayoutTransition.setStartDelay(4, 0L);
localLayoutTransition.setStartDelay(2, 0L);
localLayoutTransition.setStartDelay(3, 0L);
setLayoutTransition(localLayoutTransition);
return;
bool = false;
break;
label333:
if (this.j != 2) {
break label351;
}
setBackgroundResource(efj.Ek);
}
label351:
throw new IllegalArgumentException("drawableItem.getShape() returned an invalid value");
}