안녕하세요

프로그램 과정에서 막혔던 문제들에 대한 해결책 정리


페이지 목록

2011년 2월 25일 금요일

[안드로이드] android.text

본인의 프로그램을 만들 던 중

TextView text; < 이 녀석을 전역으로 설정해 주었다.

그 후 해당 class 내부에서 text.setText("어머나어머나 이러지마세요");

를 만들어 보니,

어머나어머나 이러지마세요 가 뜨지 않는 것이었다.

이게 무슨 귀신 씨나락 까먹고 팥뿌린데 콩나는 시추에이션이란 말인가?

그래서 text1 으로 파일명을 변경해 보았더니, 잘 돌아가더란 말이었던것이었던 말이다.

그래서 text 에 대해 조사해 보니 이와 같은 내용이 나오는 게 아닌가...


package
android.text
Provides classes used to render or track text and text spans on the screen.
You can use these classes to design your own widgets that manage text, to handle arbitrary text spans for changes, or to handle drawing yourself for an existing widget.
The Span… interfaces and classes are used to create or manage spans of text in a View item. You can use these to style the text or background, or to listen for changes. If creating your own widget, extend DynamicLayout, to manages the actual wrapping and drawing of your text.
Interfaces
This is the interface for text whose content and markup can be changed (as opposed to immutable text like Strings). 
Please implement this interface if your CharSequence has a getChars() method like the one in String that is faster than calling charAt() multiple times. 
Retrieves images for HTML <img> tags. 
Is notified when HTML tags are encountered that the parser does not know how to interpret. 
InputFilters can be attached to Editables to constrain the changes that can be made to them. 
Bit definitions for an integer defining the basic content type of text held in an Editable object. 
This interface should be added to a span object that should not be copied into a new Spenned when performing a slice or copy operation on the original Spanned it was placed in. 
A special kind of Parcelable for objects that will serve as text spans. 
This is the interface for text to which markup objects can be attached and detached. 
This is the interface for text that has markup objects attached to ranges of it. 
When an object of this type is attached to a Spannable, its methods will be called to notify it that other markup objects have been added, changed, or removed. 

An interface for splitting strings according to rules that are opaque to the user of this interface. 
When an object of a type is attached to an Editable, its methods will be called when the text is changed. 
Classes
An AlteredCharSequence is a CharSequence that is largely mirrored from another CharSequence, except that a specified range of characters are mirrored from a different char array instead. 
AndroidCharacter exposes some character properties that are not easily accessed from java.lang.Character. 
Annotations are simple key-value pairs that are preserved across TextView save/restore cycles and can be used to keep application-specific data that needs to be maintained for regions of text. 
This class accesses a dictionary of corrections to frequent misspellings. 
A BoringLayout is a very simple Layout implementation for text that fits on a single line and is all left-to-right characters. 

This class is deprecated. Old text-only interface to the clipboard. See ClipboardManager for the modern API.  
DynamicLayout is a text layout that updates itself as the text is edited. 
Factory used by TextView to create new Editables. 
This class processes HTML strings into displayable styled text. 
This filter will capitalize all the lower case letters that are added through edits. 
This filter will constrain edits not to make the length of the text greater than the specified length. 
A base class that manages text layout in visual elements on the screen. 
Stores information about bidirectional (left-to-right or right-to-left) text within the layout of a line. 
Abstract class for filtering login-related text (user names and passwords)  
This filter is compatible with GMail passwords which restricts characters to the Latin-1 (ISO8859-1) char set. 
This filter rejects characters in the user name that are not compatible with Google login. 
This filter rejects characters in the user name that are not compatible with GMail account creation. 
Convenience equivalent for when you would just want a new Object() for a span but want it to be no-copy. 
Utility class for manipulating cursors and selections in CharSequences. 
Factory used by TextView to create new Spannables. 
This is the class for text whose content is immutable but to which markup objects can be attached and detached. 
This is the class for text whose content and markup can both be changed. 
This is the class for text whose content and markup are immutable. 
StaticLayout is a Layout for text that will not be edited after it is laid out. 
TextPaint is an extension of Paint that leaves room for some extra data used during text measuring and drawing. 

A simple string splitter. 
Enums




이럴 수가....... text 를 instance 명으로 사용하지 않게 조심해야 겠다.

댓글 없음:

댓글 쓰기