This is the first method of button Click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void doSomething(View v){ | |
if(v.getId()==R.id.button1){ | |
Log.d("SOMU","Button was clicked"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Button | |
android:id="@+id/button1" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="@string/abc_action_bar_home_description" | |
android:onClick="doSomething"/> |
No comments:
Post a Comment