Android Button Maker

Android Button Maker is online tool to generate buttons code for Android Apps. Android API provide Drawable Resources where XML file defines geometric shape, including colors, border and gradients.

These button is generating based on shape drawable XML code which load faster compare to normal PNG buttons. You can customize button properties in setting panel and get source code.

Button Click Event: There are two ways to handle button click event.

(1) Add android:onClick attribute inside button xml code

<Button xmlns:android='http://schemas.android.com/apk/res/android'

android:id='@+id/button_send'

...

android:onClick='clickMethod'

/>

public void clickMethod(View view) { // Do something in response to button click }

public class MyActivity extends Activity implements View.OnClickListener {

// Write click event code

}



(2) Your Activity class need to implement View.OnClickListener then write button click listener method which shows above.

resources