Two thoughts. 1) This pop-up code for processing a visible event is hidden in the MS Net IDE and, optionally, in the Mac IDE, by folding event handlers and providing an icon to expand the section of the event code. Therefore, I do not see the bloating of the event handling code, and this does not bother me. Out of sight, out of mind.
2) for Android 1.6+, you could reorganize the XML attributes
<Button android:text="@string/get_plain_text_button"
android:id="@+id/ButtonPlainText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick= "plainTextOnClickHandler">
which corresponds to the method:
public voidplainTextOnClickHandler(View v){
editTextPlainText.setText("Plain Text Button Clicked");
}
Jal
source
share