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


Java LayoutAnimationController.setDelay方法代碼示例

本文整理匯總了Java中android.view.animation.LayoutAnimationController.setDelay方法的典型用法代碼示例。如果您正苦於以下問題:Java LayoutAnimationController.setDelay方法的具體用法?Java LayoutAnimationController.setDelay怎麽用?Java LayoutAnimationController.setDelay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.view.animation.LayoutAnimationController的用法示例。


在下文中一共展示了LayoutAnimationController.setDelay方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PillarLayout

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
public PillarLayout(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);

    setOrientation(LinearLayout.VERTICAL);
    setGravity(Gravity.CENTER_HORIZONTAL|Gravity.BOTTOM);

    Animation drop = AnimationUtils.loadAnimation(getContext(), R.anim.disk_drop);
    LayoutAnimationController animationController = new LayoutAnimationController(drop);
    animationController.setOrder(LayoutAnimationController.ORDER_REVERSE);
    animationController.setDelay(0.2f);

    setLayoutAnimation(animationController);
}
 
開發者ID:chengpo,項目名稱:hanoi-animation,代碼行數:14,代碼來源:PillarLayout.java

示例2: playLayoutAnimation

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
/**
 * 播放RecyclerView動畫
 *
 * @param animation
 * @param isReverse
 */
public void playLayoutAnimation(Animation animation, boolean isReverse) {
    LayoutAnimationController controller = new LayoutAnimationController(animation);
    controller.setDelay(0.1f);
    controller.setOrder(isReverse ? LayoutAnimationController.ORDER_REVERSE : LayoutAnimationController.ORDER_NORMAL);

    mRecyclerView.setLayoutAnimation(controller);
    mRecyclerView.getAdapter().notifyDataSetChanged();
    mRecyclerView.scheduleLayoutAnimation();
}
 
開發者ID:nuptboyzhb,項目名稱:RecyclerViewAnimation,代碼行數:16,代碼來源:RecyclerViewActivity.java

示例3: applyAnimation

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
public static void applyAnimation(RecyclerView recyclerView) {
    LayoutAnimationController controller = new LayoutAnimationController(getAnimationSetFromLeft());
    controller.setDelay(0.1f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);

    recyclerView.setLayoutAnimation(controller);
    recyclerView.getAdapter().notifyDataSetChanged();
    recyclerView.scheduleLayoutAnimation();
}
 
開發者ID:nuptboyzhb,項目名稱:RecyclerViewAnimation,代碼行數:10,代碼來源:MyLayoutAnimationHelper.java

示例4: setupInterestGridView

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
private void setupInterestGridView() {
    mGrid = (GridView) findViewById(R.id.grid);
    final Animation scaleAnimation = new ScaleAnimation(0f, 1f, 0f, 1f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    scaleAnimation.setDuration(1000l);
    scaleAnimation.setInterpolator(new AccelerateInterpolator());
    final Animation alphaAnimation = new AlphaAnimation(0.1f, 1.0f);
    alphaAnimation.setDuration(1500l);
    AnimationSet animationSet = new AnimationSet(true);
    animationSet.addAnimation(scaleAnimation);
    animationSet.addAnimation(alphaAnimation);
    LayoutAnimationController animationController = new LayoutAnimationController(animationSet);
    animationController.setDelay(0.2f);
    animationController.setOrder(LayoutAnimationController.ORDER_NORMAL);

    mGrid.setLayoutAnimation(animationController);
    mGrid.startLayoutAnimation();
    List<Interest> interests = new ArrayList<>();
    Interest interestMusic = new Interest();
    interestMusic.setName("歐美兒歌");
    interestMusic.setImageResId(R.mipmap.children_music);
    interestMusic.setPlateColor(getResources().getColor(R.color.blue_03a9f4));
    interestMusic.setActionUrl(AudioSelectionActivity.class.getName());
    interests.add(interestMusic);

    Interest interestGame = new Interest();
    interestGame.setName("益智遊戲");
    interestGame.setImageResId(R.mipmap.children_game);
    interestGame.setPlateColor(getResources().getColor(R.color.yellow_ff9800));
    interests.add(interestGame);

    Interest interestHourseKeeper = new Interest();
    interestHourseKeeper.setName("家庭管家");
    interestHourseKeeper.setImageResId(R.mipmap.hoursekeeper);
    interestHourseKeeper.setPlateColor(getResources().getColor(R.color.green_009688));
    interests.add(interestHourseKeeper);

    mGrid.setAdapter(new GridAdapter(interests));
}
 
開發者ID:DroidKOF,項目名稱:pineapple,代碼行數:39,代碼來源:InterestActivity.java

示例5: createView

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
@Override
public View createView() {

    View rootView = LayoutInflater.from(mParentVG.getContext())
            .inflate(R.layout.layout_custom_sweet, null, false);

    mSweetView = (SweetView) rootView.findViewById(R.id.sv);
    mFreeGrowUpParentRelativeLayout = (FreeGrowUpParentRelativeLayout) rootView.findViewById(R.id.freeGrowUpParentF);
    mContentRL = (RelativeLayout) rootView.findViewById(R.id.rl);
    sliderIm = (CRImageView) rootView.findViewById(R.id.sliderIM);
    mSweetView.setAnimationListener(new AnimationImp());


    if (mContentView != null) {
        mContentRL.removeAllViews();
        mContentRL.addView(mContentView);
    }
    if (mContentViewAnimationType == AnimationType.DuangLayoutAnimation) {
        mAnimationView = null;
        if (mContentView instanceof ViewGroup) {
            mAnimationView = (ViewGroup) mContentView;
        } else {
            mAnimationView = mContentRL;
        }
        Animation animation = AnimationUtils.loadAnimation(mContentRL.getContext(),
                R.anim.item_duang_show);

        LayoutAnimationController layoutAnimationController = new LayoutAnimationController(animation);
        layoutAnimationController.setDelay(0.1f);
        mAnimationView.setLayoutAnimation(layoutAnimationController);
    }

    if(mContentViewHeight > 0){
        mFreeGrowUpParentRelativeLayout.setContentHeight(mContentViewHeight);
    }

    return rootView;
}
 
開發者ID:xiangyunwan,項目名稱:AndroidSweetSheet-master,代碼行數:39,代碼來源:CustomDelegate.java

示例6: setAnim

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
private void setAnim() {
    Animation animation = AnimationUtils.loadAnimation(this,
            R.anim.list_anim);
    LayoutAnimationController lac = new LayoutAnimationController(animation);
    lac.setOrder(LayoutAnimationController.ORDER_NORMAL);
    lac.setDelay(1);
    main_list.setLayoutAnimation(lac);
}
 
開發者ID:shenhuanet,項目名稱:MediaVip-android,代碼行數:9,代碼來源:MainActivity.java

示例7: createView

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
@Override
   public View createView() {

       View rootView = LayoutInflater.from(mParentVG.getContext())
               .inflate(R.layout.layout_custom_sweet, null, false);

       mSweetView = (SweetView) rootView.findViewById(R.id.sv);
mSweetView.setSweetSheetColor(sweetSheetColor);
       mFreeGrowUpParentRelativeLayout = (FreeGrowUpParentRelativeLayout) rootView.findViewById(R.id.freeGrowUpParentF);
       mContentRL = (RelativeLayout) rootView.findViewById(R.id.rl);
       sliderIm = (CRImageView) rootView.findViewById(R.id.sliderIM);
       mSweetView.setAnimationListener(new AnimationImp());


       if (mContentView != null) {
           mContentRL.removeAllViews();
           mContentRL.addView(mContentView);
       }
       if (mContentViewAnimationType == AnimationType.DuangLayoutAnimation) {
           mAnimationView = null;
           if (mContentView instanceof ViewGroup) {
               mAnimationView = (ViewGroup) mContentView;
           } else {
               mAnimationView = mContentRL;
           }
           Animation animation = AnimationUtils.loadAnimation(mContentRL.getContext(),
                   R.anim.item_duang_show);

           LayoutAnimationController layoutAnimationController = new LayoutAnimationController(animation);
           layoutAnimationController.setDelay(0.1f);
           mAnimationView.setLayoutAnimation(layoutAnimationController);
       }

       if(mContentViewHeight > 0){
           mFreeGrowUpParentRelativeLayout.setContentHeight(mContentViewHeight);
       }

       return rootView;
   }
 
開發者ID:duguju,項目名稱:MousePaintYzz,代碼行數:40,代碼來源:CustomDelegate.java

示例8: listAnim

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
public void listAnim()
{
    LayoutAnimationController layoutanimationcontroller = new LayoutAnimationController(AnimationUtils.loadAnimation(this, 0x7f040008));
    layoutanimationcontroller.setOrder(0);
    layoutanimationcontroller.setInterpolator(new DecelerateInterpolator());
    layoutanimationcontroller.setDelay(0.5F);
    G.setLayoutAnimation(layoutanimationcontroller);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:9,代碼來源:MainUIActivity.java

示例9: onCreate

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_list_item_fly_in_out);
    
    mListAdapter = new MyExpandableAdapter();
    mListAdapter.registerDataSetObserver(new DataSetObserver() {
        @Override
        public void onChanged() {
            if (mListAdapter.getGroupCount() != 0) {
                //deleteItems();
            }
        }
    });
    mList = (ExpandableListView)findViewById(R.id.expandable_list);
    mList.setAdapter(mListAdapter);
    
    Animation animation = (Animation)AnimationUtils.loadAnimation(this, R.anim.fly_right_in);
    LayoutAnimationController controller = new LayoutAnimationController(animation);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
    controller.setDelay(0.8f);
    mList.setLayoutAnimation(controller);
    for (int i = 0; i < mListAdapter.getGroupCount(); i++) {
        mList.expandGroup(i);
    }
    
    mClearList = (Button)findViewById(R.id.btn_clear_list);
    mClearList.setOnClickListener(new OnClickListener() {
        
        @Override
        public void onClick(View v) {
            //deleteItems();
            mHandler.sendEmptyMessage(MSG_HANDLER_DELETE_ITEM);
        }
    });
}
 
開發者ID:mzlogin,項目名稱:AndroidPractices,代碼行數:37,代碼來源:ListItemFlyInOutActivity.java

示例10: makeLayoutAnimationController

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
public static LayoutAnimationController makeLayoutAnimationController() {
    LayoutAnimationController controller = new LayoutAnimationController(getAnimationSetFromRight());
    controller.setDelay(0.1f);
    controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
    return controller;
}
 
開發者ID:nuptboyzhb,項目名稱:RecyclerViewAnimation,代碼行數:7,代碼來源:MyLayoutAnimationHelper.java

示例11: syncViewToState

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
final void syncViewToState()
{
  if (this.mRecyclerViewTabWrapper == null) {}
  do
  {
    ContainerList localContainerList;
    do
    {
      return;
      localContainerList = this.mMultiDfeList.mContainerList;
      if (!localContainerList.inErrorState()) {
        break;
      }
    } while (this.mRecyclerViewBoundAlready);
    this.mLayoutSwitcher.switchToErrorMode(ErrorStrings.get(FinskyApp.get(), localContainerList.getVolleyError()));
    return;
    if ((this.mShouldDeferDataDisplay) || (!localContainerList.isReady())) {
      break;
    }
    if (this.mContainerDocument == null) {
      this.mContainerDocument = localContainerList.mContainerDocument;
    }
    if (this.mContainerDocument != null) {
      FinskyEventLog.setServerLogCookie(this.mUiElementProto, this.mContainerDocument.mDocument.serverLogsCookie);
    }
    this.mLayoutSwitcher.switchToDataMode();
  } while (this.mRecyclerViewBoundAlready);
  int i;
  DfeRecyclerBinder localDfeRecyclerBinder;
  ViewGroup localViewGroup;
  Document localDocument;
  QuickLinkHelper.QuickLinkInfo[] arrayOfQuickLinkInfo;
  String str;
  int j;
  if (this.mRestoredInstanceState != null)
  {
    i = 1;
    this.mBinder.setData(this.mMultiDfeList);
    localDfeRecyclerBinder = this.mBinder;
    localViewGroup = this.mRecyclerViewTabWrapper;
    localDocument = this.mContainerDocument;
    arrayOfQuickLinkInfo = this.mQuickLinks;
    str = this.mTitle;
    j = this.mTabMode;
    if (i == 0) {
      break label311;
    }
  }
  label311:
  for (Bundle localBundle = this.mRestoredInstanceState.mBundle;; localBundle = null)
  {
    localDfeRecyclerBinder.bind(localViewGroup, localDocument, arrayOfQuickLinkInfo, str, j, localBundle, this.mTabDataListener, this, this.mSpacerHeightProvider);
    if ((i == 0) && (Build.VERSION.SDK_INT >= 16))
    {
      PlayRecyclerView localPlayRecyclerView = (PlayRecyclerView)this.mRecyclerViewTabWrapper.findViewById(2131755329);
      Animation localAnimation = AnimationUtils.loadAnimation(localPlayRecyclerView.getContext(), 2131034138);
      localAnimation.setInterpolator(new FastOutSlowInInterpolator());
      localAnimation.setDuration(300L);
      LayoutAnimationController localLayoutAnimationController = new LayoutAnimationController(localAnimation);
      localLayoutAnimationController.setDelay(0.1F);
      localPlayRecyclerView.setLayoutAnimation(localLayoutAnimationController);
    }
    this.mRestoredInstanceState = null;
    this.mRecyclerViewBoundAlready = true;
    return;
    i = 0;
    break;
  }
  this.mLayoutSwitcher.switchToLoadingMode();
}
 
開發者ID:ChiangC,項目名稱:FMTech,代碼行數:71,代碼來源:ListTab.java

示例12: FadeInController

import android.view.animation.LayoutAnimationController; //導入方法依賴的package包/類
public static LayoutAnimationController FadeInController() {
    LayoutAnimationController animController = new LayoutAnimationController(FadeIn());
    animController.setDelay(LayoutAnimationController.ORDER_NORMAL);
    return animController;
}
 
開發者ID:xiprox,項目名稱:WaniKani-for-Android,代碼行數:6,代碼來源:Animations.java


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