---
title: "获取 TextView 的长度"
author: "hold_on"
date: "2013-11-26T11:04:45Z"
tags: []
categories: ["移动开发"]
slug: "textview"
draft: false
lastmod: "2013-11-26T11:04:45Z"
id: 1980796
url: "https://hold-on.iteye.com/blog/1980796"
---

`Paint paint =` `new` `Paint();`

`paint.setTextSize(currentTextView.getTextSize());`

`float` `size = paint.measureText(currentTextView.getText().toString());`