• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RectEvaluator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中android.animation.RectEvaluator的典型用法代码示例。如果您正苦于以下问题:Java RectEvaluator类的具体用法?Java RectEvaluator怎么用?Java RectEvaluator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RectEvaluator类属于android.animation包,在下文中一共展示了RectEvaluator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onLayout

import android.animation.RectEvaluator; //导入依赖的package包/类
@Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        int width = getMeasuredWidth();
        int height = getMeasuredHeight();

        layoutSubView(mSearch, mActionGap, 0);
        layoutSubView(mShare, 2 * mActionGap + mSearch.getMeasuredWidth(), 0);
        layoutSubView(mTrans, 3 * mActionGap + mTrans.getMeasuredWidth() + mShare.getMeasuredWidth(), 0);

//        layoutSubView(mSelectAll, 2 * mActionGap + mSearch.getMeasuredWidth() , 0);
//        layoutSubView(mSelectOther, 3 * mActionGap + mTrans.getMeasuredWidth()+ mShare.getMeasuredWidth() , 0);
//
//        layoutSubView(mDrag, width - mActionGap * 2 - mShare.getMeasuredWidth() - mCopy.getMeasuredWidth(), 0);
        layoutSubView(mCopy, width - mActionGap - mCopy.getMeasuredWidth(), 0);
        layoutSubView(mClose, ((width - (this.mActionGap * 2)) - this.mCopy.getMeasuredWidth()) - this.mClose.getMeasuredHeight(), 0);

        Rect oldBounds = mBorder.getBounds();
        Rect newBounds = new Rect(0, mSearch.getMeasuredHeight() / 2, width, height);

        if (!stickHeader && !oldBounds.equals(newBounds)) {
            ObjectAnimator.ofObject(new BoundWrapper(oldBounds), "bound", new RectEvaluator(), oldBounds, newBounds).setDuration(200).start();
        }
    }
 
开发者ID:mmjang,项目名称:quiz_helper,代码行数:24,代码来源:BigBangHeader.java


示例2: startRectAnimation

import android.animation.RectEvaluator; //导入依赖的package包/类
public void startRectAnimation(View v) {
    Rect local = new Rect();
    mShowAnimIV.getLocalVisibleRect(local);
    Rect from = new Rect(local);
    Rect to = new Rect(local);

    from.right = from.left + local.width()/4;
    from.bottom = from.top + local.height()/2;

    to.left = to.right - local.width()/2;
    to.top = to.bottom - local.height()/4;

    if (Build.VERSION.SDK_INT >= 18) {
        ObjectAnimator objectAnimator = ObjectAnimator.ofObject(mShowAnimIV, "clipBounds", new RectEvaluator(), from, to);
        objectAnimator.setDuration(C.Int.ANIM_DURATION * 4);
        objectAnimator.start();
    }
}
 
开发者ID:DIY-green,项目名称:AndroidStudyDemo,代码行数:19,代码来源:ObjectPropertyAnimActivity.java


示例3: startRectAnimation

import android.animation.RectEvaluator; //导入依赖的package包/类
@SuppressLint("NewApi")
public void startRectAnimation(View view)
{    
  View someImage = findViewById(R.id.some_image);
  Rect local = new Rect();
  someImage.getLocalVisibleRect(local);
  Rect from = new Rect(local);
  Rect to = new Rect(local);
  
  from.right = from.left + local.width()/4;
  from.bottom = from.top + local.height()/2;
  
  to.left = to.right - local.width()/2;
  to.top = to.bottom - local.height()/4;
  
  if (android.os.Build.VERSION.SDK_INT >= 18)
  {
    ObjectAnimator anim = ObjectAnimator.ofObject(someImage, "clipBounds", new RectEvaluator(), from, to);
    anim.setDuration(2000);
    anim.start();
  }
  
}
 
开发者ID:mikailsheikh,项目名称:cogitolearning-examples,代码行数:24,代码来源:PropertyAnimation06.java



注:本文中的android.animation.RectEvaluator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OMOutputFormat类代码示例发布时间:2022-05-22
下一篇:
Java AttachmentSetImpl类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap