Best code examples for TextView setTextColor method (android.widget.TextView.setTextColor)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView setTextColor method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

TextView setTextColor examples from Open Source projects
This code example shows how to use the following methods: setPadding, setText, setTextColor, setTextSize
174:	textView.setPadding((int)(20 * scale) * (leftPadding ? 2 : 1), (int)(20 * scale) * (!leftPadding && topPadding ? 1 : 0), (int)(20 * scale), 0); 
175:	textView.setText(item); 
176:	textView.setTextColor(Color.BLACK); 
177:	textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: getHeight, setGravity, setText, setTextColor, setTextSize
94:	TextView textView = new TextView(context); 
95:	textView.setText(prompt); 
96:	textView.setTextSize(14); 
97:	textView.setTextColor(Color.BLACK); 
-
104:	LinearLayout.LayoutParams.WRAP_CONTENT,textView.getHeight()); 
-
108:	textView.setGravity(Gravity.CENTER); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setLayoutParams, setText, setTextColor, setTextSize
69:	textView = new TextView(context); 
70:	textView.setTextSize(16); 
71:	textView.setTextColor(0xffffffff); 
72:	textView.setText(textId); 
73:	textView.setLayoutParams(new LinearLayout.LayoutParams( 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setText, setTextColor
308:	subText.setText(error.message()); 
-
311:	subText.setTextColor(Color.RED); 
-
315:	subText.setTextColor(Color.rgb(255,192,0)); 
-
318:	subText.setTextColor(Color.BLUE); 
-
321:	subText.setTextColor(Color.LTGRAY); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getBottom, getTop, layout, setTextColor
190:	view.layout(newLeft, view.getTop(), newLeft + viewWidth, view.getBottom()); 
191:	view.setTextColor(Color.rgb( 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams, setGravity, setText, setTextColor
58:	final TextView title = new TextView(getContext()); 
59:	title.setText(getTitle()); 
60:	title.setTextSize(24); 
61:	title.setTextColor(Color.WHITE); 
62:	title.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); 
63:	title.setGravity(Gravity.LEFT); 
64:	title.setLayoutParams(titleparams); 
65:	title.setId(TITLE_ID); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLinkTextColor, setMovementMethod, setPadding, setText, setTextColor
46:	TextView tv = new TextView(this); 
47:	tv.setTextColor(0xffffffff); 
48:	tv.setLinkTextColor(0xffa3b8fe); 
-
50:	tv.setPadding(p, p, p, p); 
51:	tv.setText(Html.fromHtml(getIntent().getStringExtra("info"))); 
52:	tv.setMovementMethod(LinkMovementMethod.getInstance()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setLayoutParams, setSingleLine, setText, setTextColor, setTextSize
166:	textView = new TextView(getContext()); 
167:	textView.setSingleLine(true); 
-
173:	textView.setText(text); 
-
177:	textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSize); 
-
180:	textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 11); 
-
183:	textView.setTypeface(Typeface.DEFAULT_BOLD); 
184:	textView.setTextColor((textColor == null) ? DEFAULT_TEXT_COLOR : textColor); 
185:	textView.setLayoutParams(textParams); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setText, setTextColor
100:	textView.setText(message); 
101:	textView.setTextColor(color); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, getText, length, setText, setTextColor
182:	TextView tv = new TextView(this); 
-
187:	tv.setLayoutParams(lp); 
-
189:	tv.setText(info.activityInfo.loadLabel(getPackageManager())); 
190:	tv.setTextColor(Color.BLACK); 
191:	tv.setTextSize(15); 
-
194:	tv.setText(tv.getText(), TextView.BufferType.SPANNABLE); 
195:	Spannable str = (Spannable) tv.getText(); 
-
200:	0, tv.length(), 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setTextColor
49:	view.setTextColor(Color.DKGRAY); 
-
51:	view.setBackgroundColor(parent.getResources().getColor(COLORS[position % COLORS.length])); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setGravity, setLines, setTextColor, setTextSize, setTypeface
239:	view.setTextColor(textColor); 
240:	view.setGravity(Gravity.CENTER); 
241:	view.setTextSize(textSize); 
242:	view.setLines(1); 
-
245:	view.setTypeface(textTypeface); 
-
247:	view.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setText, setTextColor, setTextSize, setTypeface
50:	TextView telop = new TextView(this); 
51:	telop.setText("TextViewをVideoViewに重ねます"); 
52:	telop.setTextColor(Color.RED); 
53:	telop.setTextSize(40); 
54:	telop.setTypeface(Typeface.DEFAULT, 1); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setText, setTextColor
51:	text2.setText(subtexts.get(position)); 
-
55:	text2.setBackgroundColor(backgroundColor); 
-
59:	text2.setTextColor(tagColor); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getId, setId, setLayoutParams, setGravity, setText
76:	final TextView title = new TextView(getContext()); 
77:	title.setText(getTitle()); 
78:	title.setTextSize(24); 
79:	title.setTextColor(Color.WHITE); 
80:	title.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); 
81:	title.setGravity(Gravity.LEFT); 
82:	title.setLayoutParams(titleparams); 
83:	title.setId(TITLE_ID); 
-
90:	descriptionparams.addRule(RelativeLayout.BELOW, title.getId()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, setTextColor, setTextSize, setTypeface
100:	mText = new TextView(mContext); 
101:	mText.setTextColor(0xFF8F8F8F); 
102:	mText.setTextSize(12); 
103:	mText.setTypeface(Typeface.DEFAULT_BOLD); 
104:	mText.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setGravity, setLines, setTextColor, setTextSize, setTypeface
222:	view.setTextColor(textColor); 
223:	view.setGravity(Gravity.CENTER); 
224:	view.setTextSize(textSize); 
225:	view.setLines(1); 
226:	view.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setText, setTextColor
211:	mHardCallbackFeedbackArea.setBackgroundColor(Color.GREEN); 
212:	mHardCallbackFeedbackArea.setTextColor(Color.BLACK); 
-
218:	mHardCallbackFeedbackArea.setBackgroundColor(Color.RED); 
219:	mHardCallbackFeedbackArea.setTextColor(Color.BLACK); 
220:	mHardCallbackFeedbackArea.setText(exception.toString()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setTextColor
29:	textView.setTextColor(Color.WHITE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setGravity, setText, setTextColor, setTextSize
31:	TextView v = new TextView(getActivity()); 
32:	v.setGravity(Gravity.CENTER); 
33:	v.setTextSize(40); 
34:	v.setTextColor(Color.BLACK); 
35:	v.setBackgroundColor(colour); 
36:	v.setText("Fragment ID: " + identifier); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setGravity, setPadding, setText, setTextColor, setTextSize
39:	TextView tv = new TextView(context); 
40:	tv.setPadding(10, 10, 10, 10); 
41:	tv.setGravity(Gravity.CENTER_HORIZONTAL); 
42:	tv.setTextSize(20); 
43:	tv.setText(obj.toString()); 
44:	tv.setTextColor(0xaaffffff); 
-
47:	tv.setTypeface(font); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setGravity, setText, setTextColor, setTextSize
22:	TextView textView = new TextView(context); 
23:	textView.setTextSize(14.0f); 
-
25:	textView.setText(inode.getDisplayName()); 
26:	textView.setGravity(Gravity.CENTER); 
-
34:	textView.setTextColor(Color.WHITE); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setTextColor
104:	mEditJabberID.setTextColor(themedTextColor); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getText, setPadding, setTextColor, setTextSize
111:	final String option = tv.getText().toString(); 
-
119:	tv.setTextSize(24.0f); 
-
124:	tv.setTextColor(Color.BLACK); 
125:	tv.setPadding(10, 3, 3, 3); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setLayoutParams, setShadowLayer, setSingleLine, setTextColor
114:	dateTextView = new TextView(context); 
115:	dateTextView.setId(DATE_TEXT_VIEW_ID); 
-
122:	dateTextView.setLayoutParams(params); 
123:	dateTextView.setShadowLayer(1, 0, 1, Color.WHITE); 
124:	dateTextView.setSingleLine(true); 
125:	dateTextView.setTextColor(Color.GRAY); 
126:	dateTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15); 
127:	dateTextView.setTypeface(null, Typeface.ITALIC); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setText, setTextColor
79:	ToggleButton toggleButton = new ToggleButton(context); 
80:	toggleButton.setId(toggleButtonId); 
81:	toggleButton.setText("ToggleButton" + toggleButtonId); 
82:	toggleButton.setTextColor(Color.WHITE); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setTextColor
35:	categoryTitle.setBackgroundColor(Color.WHITE); 
36:	categoryTitle.setTextColor(Color.RED); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setBackgroundDrawable, setId, setLayoutParams, setGravity, setPadding
381:	Button button = new Button(context); 
382:	button.setId(REFRESH_BUTTON_ID); 
-
393:	button.setLayoutParams(params); 
394:	button.setBackgroundDrawable(getButtonSelector()); 
395:	button.setPadding(0, paddingTopBottom, 0, paddingTopBottom); 
396:	button.setGravity(Gravity.CENTER); 
397:	button.setText("Refresh"); 
398:	button.setTextColor(Color.WHITE); 
399:	button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setChecked, setTextColor
87:	ctv.setChecked(true); 
-
93:	ctv.setTextColor(Color.BLACK); 
94:	ctv.setBackgroundColor(Color.WHITE); 
-
96:	ctv.setTextColor(Color.BLACK); 
97:	ctv.setBackgroundColor(Color.rgb(160, 160, 160)); 
-
100:	ctv.setTextColor(Color.BLACK); 
101:	ctv.setBackgroundColor(Color.rgb(80, 80, 80)); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setBackgroundColor, setChecked, setEnabled, setTextColor
57:	mRadioButtonB.setEnabled(false); 
-
69:	mRadioButtonB.setChecked(bValue[1]); 
-
116:	btn.setTextColor(fontColor); 
117:	btn.setBackgroundColor(bgColor); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setText, setTextColor, setTextSize
189:	textView = new TextView(getContext()); 
190:	textView.setText(localizationService.getString(displayTextKey)); 
191:	textView.setTextColor(txtColor); 
192:	textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, setGravity, setText, setTextColor
85:	TextView textView = new TextView(context); 
86:	textView.setGravity(Gravity.CENTER); 
87:	textView.setLayoutParams(params); 
88:	textView.setText(text); 
89:	textView.setTextColor(Color.BLACK); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setId, setText, setTextColor
110:	DigitalClock digitalClock = new DigitalClock(context); 
111:	digitalClock.setId(digitalClockId); 
112:	digitalClock.setText("Digital Clock" + digitalClockId); 
113:	digitalClock.setTextColor(Color.WHITE); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setPadding, setTextColor, setTextSize
63:	mLabel = new TextView(getContext()); 
-
85:	mLabel.setPadding(0, 0, 0, new Float(padding).intValue()); 
86:	mLabel.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12.0f); 
87:	mLabel.setTextColor(sUnselectedTextColor); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setLayoutParams, setText, setTextColor, setTextSize
163:	TextView title = new TextView(this); 
164:	title.setText("授权"); 
165:	title.setTextColor(Color.WHITE); 
166:	title.setTextSize(24f); 
-
170:	title.setLayoutParams(titleParams); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setPadding, setText, setTextColor, setTypeface
127:	descriptionTextView = new TextView(context); 
128:	descriptionTextView.setPadding(15, 5, 0, 0); 
-
131:	descriptionTextView.setTypeface(Typeface.defaultFromStyle(Typeface.ITALIC), Typeface.ITALIC); 
132:	descriptionTextView.setTextColor(Color.LTGRAY); 
133:	descriptionTextView.setText(description); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setBackgroundDrawable, setId, setLayoutParams, setText, setTextColor
176:	Button button = new Button(context); 
177:	button.setId(UPDATE_BUTTON_ID); 
-
186:	button.setLayoutParams(params); 
187:	button.setBackgroundDrawable(getButtonSelector()); 
188:	button.setText("Update"); 
189:	button.setTextColor(Color.WHITE); 
190:	button.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getText, setTextColor
34:	Editable edEmail = eMail.getText(); 
-
39:	eMail.setTextColor(Color.RED); 
-
43:	eMail.setTextColor(Color.GREEN); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setText, setTextColor, setTextSize
96:	radioAnswer.setTextColor(Color.BLACK); 
97:	radioAnswer.setText(answer); 
98:	radioAnswer.setTextSize(15); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setId, setText, setTextColor
62:	RadioButton rd0 = new RadioButton(this); 
63:	rd0.setId(0); 
64:	rd0.setText("�����N�P"); 
65:	rd0.setTextColor(Color.rgb(0, 0, 0)); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setText, setTextColor
32:	editText.setTextColor(0xFF000000); 
33:	editText.setText(""); 
Full Snippet Info
5
CodeRank
Related TextView setTextColor Questions & Answers:
setTextColor Method Overview
Sets the text color.
See Also