I would like to know how to make a particular part of a text that will be displayed in a TEXTVIEW appear in bold:
Iwouldlikethedisplayedtexttolooklikethis:Totalvalue=>R$1100.
Activity:
package genesysgeneration.stackall;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
private TextView tvValor;
private Button btnMais100;
int valor;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tvValor=(TextView)findViewById(R.id.tvValor);
btnMais100=(Button)findViewById(R.id.btnMais100);
valor=0;
btnMais100.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
valor+=100;
tvValor.setText(String.valueOf("Valor total => R$ " + valor + "."));
}
});
}
}