Last active
March 19, 2016 10:03
-
-
Save webserveis/ecd33726947bc163acec to your computer and use it in GitHub Desktop.
Base Button in Android
This file contains hidden or 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/myButton" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Button" /> | |
Button myButton = (Button) findViewById(R.id.button1); | |
myButton.setOnClickListener( new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// Set Action on On Click event | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment