@@ -0,0 +1,2419 @@
+package kevindu.buttonsample;%0A%0Aimport android.graphics.Color;%0Aimport android.support.v7.app.ActionBarActivity;%0Aimport android.os.Bundle;%0Aimport android.view.Menu;%0Aimport android.view.MenuItem;%0Aimport android.view.View;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0Aimport android.widget.ImageButton;%0Aimport android.widget.RelativeLayout;%0Aimport android.widget.TextView;%0A%0A%0Apublic class MainActivity extends ActionBarActivity %7B%0A%0A    RelativeLayout background;%0A    Button btnGreen, btnBlue;%0A    ImageButton btnImage;%0A    EditText income;%0A    int clicks = 0;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main);%0A%0A        background = (RelativeLayout) findViewById(R.id.background);%0A        btnGreen = (Button) findViewById(R.id.button2);%0A        btnBlue = (Button) findViewById(R.id.button);%0A        btnImage = (ImageButton) findViewById(R.id.imageButton);%0A        income =(EditText) findViewById(R.id.editText);%0A%0A        btnGreen.setOnClickListener(new View.OnClickListener() %7B%0A            public void onClick(View view) %7B%0A                background.setBackgroundColor(Color.parseColor(%22#00ff00%22));%0A            %7D%0A        %7D);%0A%0A        btnBlue.setOnClickListener(new View.OnClickListener() %7B%0A            public void onClick(View view) %7B%0A                background.setBackgroundColor(Color.parseColor(%22#5C5C9D%22));%0A            %7D%0A        %7D);%0A%0A        btnImage.setOnClickListener(new View.OnClickListener() %7B%0A            public void onClick(View view) %7B%0A                clicks++;%0A                income.setText(%22Income: %22 + clicks);%0A%0A            %7D%0A        %7D);%0A%0A%0A    %7D%0A%0A%0A    @Override%0A    public boolean onCreateOptionsMenu(Menu menu) %7B%0A        // Inflate the menu; this adds items to the action bar if it is present.%0A        getMenuInflater().inflate(R.menu.menu_main, menu);%0A%0A        return true;%0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        // Handle action bar item clicks here. The action bar will%0A        // automatically handle clicks on the Home/Up button, so long%0A        // as you specify a parent activity in AndroidManifest.xml.%0A        int id = item.getItemId();%0A%0A        //noinspection SimplifiableIfStatement%0A        if (id == R.id.action_settings) %7B%0A            return true;%0A        %7D%0A%0A        return super.onOptionsItemSelected(item);%0A    %7D%0A%7D%0A

Create Mainactivity.java