當前位置: 首頁>>代碼示例>>Java>>正文


Java ViewGroup.startAnimation方法代碼示例

本文整理匯總了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();
}
 
開發者ID:kranthi0987,項目名稱:easyfilemanager,代碼行數:16,代碼來源:AppRate.java

示例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);
        }
    };
}
 
開發者ID:wzx54321,項目名稱:XinFramework,代碼行數:26,代碼來源:TransactionDelegate.java

示例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");
        }
    }
}
 
開發者ID:skydoves,項目名稱:Medal,代碼行數:14,代碼來源:MedalAnimation.java


注:本文中的android.view.ViewGroup.startAnimation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。