我試圖設置一個段落的標題爲斜體(如果可能的話,也是粗體),但是我不喜歡它。 這是我到目前爲止有:在textview中添加字體到一個特定的單詞
...sound and active.\n\n HEAD \n The skull is broad and...
所以我想要做的就是設置「HEAD」,以斜體和大膽。
完整代碼:
FlowTextView tv1 = (FlowTextView) findViewById(R.id.tv4);
Spanned spannable1 = Html.fromHtml("<html ... </html>");
tv1.setText(spannable1); // using html
tv1.setText("...sound and active.\n\n HEAD \n The skull is broad and....
tv1.setTextSize(20);
tv1.invalidate();
誰能幫助我?