当前位置: 代码迷 >> Android >> TextView类中有setText方法吗?解决方案
  详细解决方案

TextView类中有setText方法吗?解决方案

热度:111   发布时间:2016-05-01 21:56:04.0
TextView类中有setText方法吗?
我在网上看到的android开发示例程序 “hello,word",用了setText方法,(在模拟器上也能跑起来)但我网上查看API TextView类中好像没看到有setText方法啊:

查看的网站链接:

http://www.cnblogs.com/over140/archive/2010/09/02/1815439.html

------解决方案--------------------
查自己下载的sdk中android-sdk-windows\docs的api文档
final void setText(int resid)
final void setText(char[] text, int start, int len)
Sets the TextView to display the specified slice of the specified char array.
final void setText(int resid, TextView.BufferType type)
final void setText(CharSequence text)
Sets the string value of the TextView.
void setText(CharSequence text, TextView.BufferType type)
Sets the text that this TextView is to display (see setText(CharSequence)) and also sets whether it is stored in a styleable/spannable buffer and whether it is editable.
------解决方案--------------------
http://developer.android.com/reference/android/widget/TextView.html
建议看一下原文,别人嚼过的馍不香。
  相关解决方案