How to make certain part of Text to Bold ? In String pars I want this specific part of the text to be in bold "How Stock Market works ?" and the remaining part of the text should remain normal.
public class second extends AppCompatActivity {
TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
textView = (TextView)findViewById(R.id.Text1);
String pars = "How Stock Market works ?\n" +
"They are called by the collective names of ‘buyers’ and
‘sellers’.\n" +
"\n" +
"So imagine that there is a ‘tug of war’ situation between the
‘buyers’ and the ‘sellers’. The one who wins this war will control the
price.\n" +
"\n" +
"Case 1] Buyers control the game:\n" +
"\n" +
"For the buyers to control the game, there has to be more
supply. More supply of shares would mean that sellers are desperate to sell
their part and hence this would give the control in the hands of buyers.\n"
+
"\n" +
"This makes the market such an interesting place! After all
predictability is boring and tedious. ";
textView.setText(pars);
textView.setMovementMethod(new ScrollingMovementMethod());
}
}