本文整理汇总了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);
}
示例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();
}
示例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();
}
示例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));
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
});
}
示例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;
}
示例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();
}
示例12: FadeInController
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
public static LayoutAnimationController FadeInController() {
LayoutAnimationController animController = new LayoutAnimationController(FadeIn());
animController.setDelay(LayoutAnimationController.ORDER_NORMAL);
return animController;
}