This repository has been archived by the owner on Apr 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 369
5.1 · DocumentView
Mathew Kurian edited this page Nov 28, 2014
·
2 revisions
##DocumentView
extends View
###Class Overview
Displays static text to user. Similar to TextView
but provides additional features to support text-justification and auto-hyphenation.
#####Java
DocumentView documentView = new DocumentView(this, DocumentView.PLAIN_TEXT);
#####XML
<com.bluejamesbond.text.DocumentView
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
####Constructors
Description | |
---|---|
DocumentView(Context context) |
|
DocumentView(Context context, AttributeSet attrs) |
|
DocumentView(Context context, AttributeSet attrs, int defStyle) |
|
DocumentView(Context context, int type) Constructs a DocumentView with the speficied type |
####Static Variables
Type | Description |
---|---|
final int |
PLAIN_TEXT Optimized for simple/plain unformatted text (no support for Spannable ). |
final int |
FORMATTED_TEXT Enable support for Spannable . |
####Public Methods
Return | Description |
---|---|
void |
setTextSize(float textSize) Set the internal Paint text size. |
void |
setColor(int textColor) Set the internal Paint foreground color. |
void |
setTypeface(Typeface typeface) Sets the typeface and style in which the text should be displayed. |
void |
setText(CharSequence source) Set the content that needs to be displayed. |
CharSequence |
getText() Return the text the this is displaying. |
DocumentLayout.LayoutParams |
getDocumentLayoutParams() Get the LayoutParams associated with this view. |
DocumentLayout |
getLayout() Get the DocumentLayout associated with this view. |
Warning: Wiki is slightly out of date at the moment
Copyright © 2012-2015 TextJustify-Android