转载:http://stackoverflow.com/questions/4913643/rect-and-rectf-in-android-sdk

UsingRectyou define its edges using integers and usingRectFthey are defined as floats.

Looking at them more carefully I have spotted a few differences actually. I will only list what one implementation has more compared to the other one.

Rect

  • equals(Object obj)(for some reason it as it's own implementation of equals)
  • exactCenterX()
  • exactCenterY()
  • flattenToString()
  • toShortString()
  • unflattenFromString(String str)

RectF

  • round(Rect dst)
  • roundOut(Rect dst)
  • set(Rect src)

So apparently there are some differences.

更多相关文章

  1. Android(安卓)TableLayout设计模板
  2. android gmail 添加附件(转载)
  3. Android中自定义Dialog常用的两种方式
  4. 转载:Android(安卓)获取ROOT权限原理解析
  5. [Android] [ANR的原理、分析、实战] 【转载】
  6. 转载关于android高效显示图片的文章---From 移动微技
  7. android4.0 添加一个新的android 键值(转载)
  8. Android:DropPopMenu — 显示位置跟随操作按钮显示的带箭头的弹出
  9. android 多点触摸实现图片缩放

随机推荐

  1. Android系统在超级终端下必会的命令大全(a
  2. Android圆角图片
  3. Android(安卓)XML解析
  4. Android(安卓)之EditText自动弹出/不弹出
  5. Android控件属性大全
  6. android相对布局的案例
  7. Android(安卓)studio教程学习笔记4——Te
  8. 详解 Android(安卓)的 Activity 组件
  9. 如何通过代码更改ANDROID的UI布局
  10. Android之ListView中的分割线