官网API:

getTextBounds

Added in  API level 1
void getTextBounds (String text,                 int start,                 int end,                 Rect bounds)

Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).由调用者返回在边界(分配)的最小矩形包含所有的字符,以隐含原点(0,0)。

Parameters
text String: String to measure and return its bounds 字符串来衡量并返回它的界限
start int: Index of the first char in the string to measure 索引的第一个字符的字符串来衡量
end int: 1 past the last char in the string measure 1过去的最后一个字符字符串
bounds Rect: Returns the unioned bounds of all the text. Must be allocated by the caller.返回联合边界的所有文本。必须分配给调用者。

getTextBounds

Added in  API level 1
void getTextBounds (char[] text,                 int index,                 int count,                 Rect bounds)

Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).由调用者返回在边界(分配)的最小矩形包含所有的字符,以隐含原点(0,0)。

Parameters
text char: Array of chars to measure and return their unioned bounds数组的字符来衡量并返回他们的联合
index int: Index of the first char in the array to measure第一个字符的索引数组来衡量
count int: The number of chars, beginning at index, to measure字符的数量,从指数来衡量
bounds Rect: Returns the unioned bounds of all the text. Must be allocated by the caller.返回联合边界的所有文本。必须分配给调用者。

更多相关文章

  1. Tasks and Back Stack任务与返回堆
  2. Android自定义ViewGroup神器-ViewDragHelper
  3. Android(安卓)APP修改全局字体
  4. Android输入法弹出流程
  5. Android过滤特殊字符和emoji表情
  6. ContentProvider使用详解
  7. android 精确定位
  8. android音乐播放器开发 SweetMusicPlayer 加载歌曲列表
  9. android 事件模型

随机推荐

  1. Android(安卓)多媒体扫描过程(Android(安
  2. [转]Android(安卓)EditView属性
  3. Android(安卓)Activity onNewIntent() 详
  4. Android(安卓)NDK编程浅入深出之--了解ND
  5. android adb命令 抓取系统各种 log
  6. Android实现九宫格
  7. Android之MotionLayout(四),用 MotionLay
  8. android studio ndk 开发以及问题
  9. android 定时器的实现
  10. android 集成腾讯bugly版本升级功能