本文整理汇总了Java中android.view.animation.LayoutAnimationController.setOrder方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutAnimationController.setOrder方法的具体用法?Java LayoutAnimationController.setOrder怎么用?Java LayoutAnimationController.setOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.animation.LayoutAnimationController
的用法示例。
在下文中一共展示了LayoutAnimationController.setOrder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onInitView
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
@Override
protected void onInitView() {
mSwipeRefreshLayout.setColorSchemeResources(
R.color.username1,
R.color.username2,
R.color.username3,
R.color.username4,
R.color.username5,
R.color.username6);
mSwipeRefreshLayout.setOnRefreshListener(this);
mAdapter = new CategoryAdapter(getContext(),R.layout.category_item,mDatas);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mRecyclerView.addItemDecoration(new RecycleViewDivider(getActivity(), LinearLayoutManager.HORIZONTAL));
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setOnLoadMoreListener(this);
mRecyclerView.setEmpty();
LayoutAnimationController lac = new LayoutAnimationController(AnimationUtils.loadAnimation(getContext(),R.anim.fade_in));
lac.setOrder(LayoutAnimationController.ORDER_NORMAL);
mRecyclerView.setLayoutAnimation(lac);
mRecyclerView.startLayoutAnimation();
getData(true);
}
示例2: getAnimationController
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
/**
* ListView节点出现动画
*
* @return
*/
protected LayoutAnimationController getAnimationController() {
int duration = 300;
AnimationSet set = new AnimationSet(true);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(duration);
set.addAnimation(animation);
animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
-1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
animation.setDuration(duration);
set.addAnimation(animation);
LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
return controller;
}
示例3: loadAnimation2
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
/**
* 加载动画2.
*/
public static LayoutAnimationController loadAnimation2() {
int duration = 300;
AnimationSet set = new AnimationSet(true);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(duration);
set.addAnimation(animation);
animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
animation.setDuration(duration);
set.addAnimation(animation);
LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
return controller;
}
示例4: intLayoutAnim
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
private void intLayoutAnim()
{
Animation slideIn = new TranslateAnimation(TranslateAnimation.RELATIVE_TO_SELF, -1, TranslateAnimation.ABSOLUTE, 0,
TranslateAnimation.ABSOLUTE, 0, TranslateAnimation.ABSOLUTE, 0);
slideIn.setDuration(KAnimTimeShort);
mAnimIn = new LayoutAnimationController(slideIn, LayoutAnimDelay);
Animation slideOut = new TranslateAnimation(TranslateAnimation.ABSOLUTE, 0, TranslateAnimation.RELATIVE_TO_SELF, -1,
TranslateAnimation.ABSOLUTE, 0, TranslateAnimation.ABSOLUTE, 0);
slideOut.setDuration(KAnimTimeShort);
slideOut.setFillAfter(true);
mAnimOut = new LayoutAnimationController(slideOut, LayoutAnimDelay);
mAnimOut.setOrder(LayoutAnimationController.ORDER_REVERSE);
mainMenu.setLayoutAnimation(mAnimIn);
mHideShowListener = new HideShowListener();
mainMenu.setLayoutAnimationListener(mHideShowListener);
mReady.autoSetVal(true, AnimationBlockTimer);
}
示例5: 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);
}
示例6: 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();
}
示例7: 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();
}
示例8: 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));
}
示例9: 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);
}
示例10: animateGridIn
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
private void animateGridIn() {
LayoutAnimationController lac = new LayoutAnimationController(
AnimationUtils.loadAnimation(MainAdActivity.this, com.halohoop.dragadgridview.R.anim.main_item_anim));
// 设置顺序
// lac.setOrder(LayoutAnimationController.ORDER_RANDOM);
lac.setOrder(LayoutAnimationController.ORDER_NORMAL);
// 设置一个布局动画
dgv.setLayoutAnimation(lac);
// 开启动画
dgv.startLayoutAnimation();
}
示例11: initDataAndView
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
private void initDataAndView() {
income = database.getSR_sum(MyStringUtils.INDEX_TABLE_SRZC_SR);
expend = database.getSR_sum(MyStringUtils.INDEX_TABLE_SRZC_ZC);
countofincome = database.getCount(2, "income_record", "");
for (int i = 0; i < MyStringUtils.monthStrings.length; i++) {
eachmonthincome[i] = Float.parseFloat(database.getSRGL(0,
MyStringUtils.monthStrings[i]));
eachmonthexpend[i] = Float.parseFloat(database.getSRGL(1,
MyStringUtils.monthStrings[i]));
if (expend != 0) {
MyLineChart.Percent_Expend[i] = (eachmonthexpend[i] / expend) * 100;
}
if (income != 0) {
MyLineChart.Percent_Income[i] = (eachmonthincome[i] / income) * 100;
}
}
database.close();
String str = String.format(title, year, expend, income, countofincome);
content_count_title.setText(str);
AnimationSet set = new AnimationSet(true);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(1500);
set.addAnimation(animation);
animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
animation.setDuration(3000);
animation.setInterpolator(new LinearInterpolator());
set.addAnimation(animation);
LayoutAnimationController controller = new LayoutAnimationController(
set, 1f);
controller.setOrder(LayoutAnimationController.ORDER_NORMAL);
count_rl.setLayoutAnimation(controller);
}
示例12: 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);
}
示例13: 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);
}
});
}
示例14: onCreate
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.animate_layout_animation);
LinearLayout ll = (LinearLayout) findViewById(R.id.ll);
ScaleAnimation sa = new ScaleAnimation(0, 1, 0, 1);
sa.setDuration(2000);
// 第二个参数dely : the delay by which each child's animation must be offset
LayoutAnimationController lac = new LayoutAnimationController(sa, 0.5F);
// 设置显示的顺序 这个必须要在dely不为0的时候才有效
lac.setOrder(LayoutAnimationController.ORDER_NORMAL);
ll.setLayoutAnimation(lac);
}
示例15: init
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
public void init() {
animationSet = new AnimationSet(true);
layoutAnimationController = new LayoutAnimationController(animationSet, 0.3f);
layoutAnimationController.setOrder(LayoutAnimationController.ORDER_NORMAL);
setAnimation(null);
setLayoutAnimation(layoutAnimationController);
}