本文整理匯總了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");
}
}
}