回答編集履歴

2

追記しました。

2017/04/21 00:15

投稿

Clor
Clor

スコア883

test CHANGED
@@ -18,6 +18,12 @@
18
18
 
19
19
  textView.setText(name);
20
20
 
21
+ // 以下どれでも色変更ができます
22
+
21
- textView.setTextColor(Color.parseColor("#009987"));
23
+ textView.setTextColor(Color.parseColor("#FF0000")); // 16進数指定
24
+
25
+ textView.setTextColor(Color.RED); // 用意されている色から指定
26
+
27
+ textView.setTextColor(Color.rgb(255, 0, 0)); // RGBで指定
22
28
 
23
29
  ```

1

追記

2017/04/21 00:15

投稿

Clor
Clor

スコア883

test CHANGED
@@ -3,3 +3,21 @@
3
3
  String html = "<font color='#009987'> name </font>";
4
4
 
5
5
  ```
6
+
7
+
8
+
9
+ (追記)
10
+
11
+ AndroidのTextViewはHTMLで色を変えることはできません。
12
+
13
+ テキスト色変更の関数を利用して下さい。
14
+
15
+ ```Java
16
+
17
+ String name = "Hello";
18
+
19
+ textView.setText(name);
20
+
21
+ textView.setTextColor(Color.parseColor("#009987"));
22
+
23
+ ```