// Change the title of the button mButton.setText(R.string.button_name);
// Alternative to public function showMe mButton.setOnClickListener(new View.OnClickListener()) { @Override publicvoidonClick(View v){ mTextView.setVisibility(View.VISIBLE); mTextView.setText(R.string.show_text); } } }
publicvoidshowMe(View view){ // Append showMe to the onClick event in the mTextView.setVisibility(View.VISIBLE); mTextView.setText(R.string.show_text); } }