本文整理汇总了Java中android.view.ViewGroup.startAnimation方法的典型用法代码示例。如果您正苦于以下问题:Java ViewGroup.startAnimation方法的具体用法?Java ViewGroup.startAnimation怎么用?Java ViewGroup.startAnimation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.ViewGroup
的用法示例。
在下文中一共展示了ViewGroup.startAnimation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: displayViews
import android.view.ViewGroup; //导入方法依赖的package包/类
private void displayViews(ViewGroup mainView) {
if(null != viewGroup){
viewGroup.setVisibility(View.VISIBLE);
viewGroup.addView(mainView);
}
else{
LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
activity.addContentView(mainView, params);
}
Animation fadeInAnimation = AnimationUtils.loadAnimation(activity, android.R.anim.fade_in);
mainView.startAnimation(fadeInAnimation);
if (onShowListener != null) onShowListener.onRateAppShowing();
}
示例2: mockStartWithPopAnim
import android.view.ViewGroup; //导入方法依赖的package包/类
private void mockStartWithPopAnim(ISupportFragment from, ISupportFragment to, final Animation exitAnim) {
Fragment fromF = (Fragment) from;
final ViewGroup container = findContainerById(fromF, from.getSupportDelegate().mContainerId);
if (container == null) return;
from.getSupportDelegate().mLockAnim = true;
View fromView = fromF.getView();
container.removeViewInLayout(fromView);
final ViewGroup mock = addMockView(fromView, container);
to.getSupportDelegate().mEnterAnimListener = new SupportFragmentDelegate.EnterAnimListener() {
@Override
public void onEnterAnimStart() {
mock.startAnimation(exitAnim);
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
container.removeView(mock);
}
}, exitAnim.getDuration() + BUFFER_TIME);
}
};
}
示例3: startAnimation
import android.view.ViewGroup; //导入方法依赖的package包/类
public void startAnimation(ViewGroup viewGroup) {
if(builder.getType() == PARENT) {
viewGroup.startAnimation(builder.build());
} else {
try {
MedalAnimation medalAnimation = builder.build();
for (int i = 0; i < viewGroup.getChildCount(); i++)
viewGroup.getChildAt(i).startAnimation(medalAnimation);
} catch (Exception e) {
throw new RuntimeException("child medal animation runtime exception");
}
}
}