use of android.view.animation.BounceInterpolator in project WilliamChart by diogobernardino.
the class BarFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View layout = inflater.inflate(R.layout.fragment_bar, container, false);
mChart = (BarChartView) layout.findViewById(R.id.chart);
mFirstStage = true;
layout.setOnClickListener(this);
mChart.setOnClickListener(this);
BarSet dataset = new BarSet(mLabels, mValues[0]);
dataset.setColor(Color.parseColor("#eb993b"));
mChart.addData(dataset);
mChart.setBarSpacing(Tools.fromDpToPx(3));
mChart.setXLabels(AxisRenderer.LabelPosition.NONE).setYLabels(AxisRenderer.LabelPosition.NONE).setXAxis(false).setYAxis(false);
mChart.show(new Animation().setEasing(new BounceInterpolator()));
return layout;
}
use of android.view.animation.BounceInterpolator in project UltimateAndroid by cymcsg.
the class PullDoorView method setupView.
@SuppressLint("NewApi")
private void setupView() {
// 这个Interpolator你可以设置别的 我这里选择的是有弹跳效果的Interpolator
Interpolator polator = new BounceInterpolator();
mScroller = new Scroller(mContext, polator);
// 获取屏幕分辨率
WindowManager wm = (WindowManager) (mContext.getSystemService(Context.WINDOW_SERVICE));
DisplayMetrics dm = new DisplayMetrics();
wm.getDefaultDisplay().getMetrics(dm);
mScreenHeigh = dm.heightPixels;
mScreenWidth = dm.widthPixels;
// 这里你一定要设置成透明背景,不然会影响你看到底层布局
this.setBackgroundColor(Color.argb(0, 0, 0, 0));
mImgView = new ImageView(mContext);
mImgView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
// 填充整个屏幕
mImgView.setScaleType(ImageView.ScaleType.FIT_XY);
// 默认背景
mImgView.setImageResource(R.drawable.test);
addView(mImgView);
}
use of android.view.animation.BounceInterpolator in project UltimateAndroid by cymcsg.
the class PullDoorView method setupView.
@SuppressLint("NewApi")
private void setupView() {
Interpolator polator = new BounceInterpolator();
mScroller = new Scroller(mContext, polator);
WindowManager wm = (WindowManager) (mContext.getSystemService(Context.WINDOW_SERVICE));
DisplayMetrics dm = new DisplayMetrics();
wm.getDefaultDisplay().getMetrics(dm);
mScreenHeigh = dm.heightPixels;
mScreenWidth = dm.widthPixels;
this.setBackgroundColor(Color.argb(0, 0, 0, 0));
mImgView = new ImageView(mContext);
mImgView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
mImgView.setScaleType(ImageView.ScaleType.FIT_XY);
mImgView.setImageResource(R.drawable.circle_button_ic_action_tick);
addView(mImgView);
}
use of android.view.animation.BounceInterpolator in project FlexibleAdapter by davideas.
the class SlideItemAnimator method animateAddImpl.
protected ViewPropertyAnimatorCompat animateAddImpl(ViewHolder holder) {
final View view = holder.itemView;
ViewCompat.animate(view).cancel();
int width = getWidth(holder);
return ViewCompat.animate(view).translationXBy(-width).setInterpolator(new BounceInterpolator());
}
use of android.view.animation.BounceInterpolator in project CurtainView by aicaprio.
the class SampleActivity method showSample2.
private void showSample2() {
setContentView(R.layout.activity_sample2);
final CurtainView curtainView = (CurtainView) findViewById(R.id.cv1);
final ImageView iv1 = (ImageView) findViewById(R.id.iv1);
final GridView gv1 = (GridView) findViewById(R.id.gv1);
final List<Map<String, Integer>> data = getData();
gv1.setAdapter(new SimpleAdapter(this, data, R.layout.item_numbers, new String[] { TEXT_TAG }, new int[] { R.id.item_tvNum }));
gv1.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
showToast(data.get(position).get(TEXT_TAG) + " clicked");
}
});
iv1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
curtainView.toggleStatus();
}
});
curtainView.setScrollerInterpolator(new BounceInterpolator());
curtainView.post(new Runnable() {
@Override
public void run() {
curtainView.setCurtainGravityAndFixedValue(null, iv1.getHeight());
}
});
}
Aggregations