/* on click function */
public void a(android.view.View view)
{
android.widget.TextView b;
Log.d(":-)", "Button Pressed");
b = ((android.widget.TextView)
getLayoutInflater()
.inflate(R.layout.fragment_test, null)
.findViewById(R.id.button1));
Log.d(":-)", "Text before: " + b.getText());
b.setText("APA");
Log.d(":-)", "Text after: " + b.getText());
}
/* log output (pressed button 2 times in a row) */ /*
Button Pressed
Text before: Hello world!
Text after: APA
Button Pressed
Text before: Hello world!
Text after: APA
*/
Comments