I want to make the text in `EditText` bold `onClick` of a button, but the code below gives me an error when I run the application in the emulator the error is `The application chatApp has stopped unexpectedly`, yet when I take this code out it works fine.

Code

```
 private void setBoldText() {
    final EditText sendMessage = (EditText) findViewById(R.id.myMessage);
    Button boldButton = (Button) findViewById(R.id.btnBold);
    boldButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            sendMessage.setTypeface(null, Typeface.BOLD);

        }
    });

}

```