本文整理汇总了Java中android.view.animation.LayoutAnimationController.setInterpolator方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutAnimationController.setInterpolator方法的具体用法?Java LayoutAnimationController.setInterpolator怎么用?Java LayoutAnimationController.setInterpolator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.animation.LayoutAnimationController
的用法示例。
在下文中一共展示了LayoutAnimationController.setInterpolator方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPostExecute
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
if (itemList.size() == 0) Toast.makeText(MyRank.this, "发生未知错误",Toast.LENGTH_SHORT).show();
RecyclerView rankList = findViewById(R.id.rank_list);
ReleaseRankItemAdapter adapter = new ReleaseRankItemAdapter(itemList);
GridLayoutManager layoutManager = new GridLayoutManager(MyRank.this, 1);
rankList.setLayoutManager(layoutManager);
rankList.setAdapter(adapter);
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(550);
lac = new LayoutAnimationController(animation, 0.12f);
lac.setInterpolator(new DecelerateInterpolator());
rankList.setLayoutAnimation(lac);
RecyclerView ranklist1 = findViewById(R.id.rank_list1);
ReleaseRankItemAdapter adapter1 = new ReleaseRankItemAdapter(itemListOthers);
GridLayoutManager layoutManager1 = new GridLayoutManager(MyRank.this,1);
ranklist1.setLayoutManager(layoutManager1);
ranklist1.setAdapter(adapter1);
ranklist1.setLayoutAnimation(lac);
}
示例2: loadAnimation
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
/**
* 加载动画.
*/
@SuppressWarnings("ResourceType")
public static LayoutAnimationController loadAnimation(Context context) {
/*
* 创建动画的集合
*/
AnimationSet set = new AnimationSet(false);
Animation animation;
/*
* 创建旋转动画
*/
animation = new RotateAnimation(180, 10);
animation.setDuration(1000);
set.addAnimation(animation);
LayoutAnimationController controller = new LayoutAnimationController(set, 1);
controller.setInterpolator(context, android.R.anim.accelerate_interpolator);
controller.setAnimation(set);
return controller;
}
示例3: init
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
private void init() {
widthScale(0.8f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(550);
lac = new LayoutAnimationController(animation, 0.12f);
lac.setInterpolator(new DecelerateInterpolator());
}
示例4: init
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
private void init() {
widthScale(0.95f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(350);
animation.setStartOffset(150);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
示例5: init
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
private void init() {
widthScale(0.8f);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 2f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(550);
mLac = new LayoutAnimationController(animation, 0.12f);
mLac.setInterpolator(new DecelerateInterpolator());
}
示例6: 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);
}
示例7: onCreateView
import android.view.animation.LayoutAnimationController; //导入方法依赖的package包/类
@Override
public View onCreateView() {
widthScale(0.95f);
LinearLayout ll_container = new LinearLayout(context);
ll_container.setOrientation(LinearLayout.VERTICAL);
ll_container.setBackgroundColor(Color.TRANSPARENT);
/** title */
tv_title = new TextView(context);
tv_title.setGravity(Gravity.CENTER);
tv_title.setPadding(dp2px(10), dp2px(5), dp2px(10), dp2px(5));
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
params.topMargin = dp2px(20);
ll_container.addView(tv_title, params);
/** title underline */
v_line_title = new View(context);
ll_container.addView(v_line_title);
/** listview */
lv = new ListView(context);
lv.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1));
lv.setCacheColorHint(Color.TRANSPARENT);
lv.setFadingEdgeLength(0);
lv.setVerticalScrollBarEnabled(false);
lv.setSelector(new ColorDrawable(Color.TRANSPARENT));
ll_container.addView(lv);
/** cancel btn */
tv_cancel = new TextView(context);
tv_cancel.setGravity(Gravity.CENTER);
LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lp.topMargin = dp2px(7);
lp.bottomMargin = dp2px(7);
tv_cancel.setLayoutParams(lp);
ll_container.addView(tv_cancel);
/** LayoutAnimation */
TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 6f, Animation.RELATIVE_TO_SELF, 0);
animation.setInterpolator(new DecelerateInterpolator());
animation.setDuration(350);
animation.setStartOffset(150);
lac = new LayoutAnimationController(animation, 0.12f);
lac.setInterpolator(new DecelerateInterpolator());
return ll_container;
}