package com.example.nasaproject;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;


public class MainActivity extends Activity {

	private TextView title;
	private TextView date;
	private ImageView image;
	private TextView description;
	private Button buttonRefresh;
	private Button buttonSetWallpaper;
	
	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initializeUI();
        
        
    }
    
    private void initializeUI(){
    	
    	title = (TextView) findViewById(R.id.imageTitle);
    	date = (TextView) findViewById(R.id.imageDate);
    	image = (ImageView) findViewById(R.id.imageDisplay);
    	description = (TextView) findViewById(R.id.imageDesc);
    	buttonRefresh = (Button) findViewById(R.id.button_refresh);
    	buttonSetWallpaper = (Button) findViewById(R.id.button_setAsWallpaper);
    }
 
}

@@ -138,16 +138,84 @@
 nuItem;%0A
+import android.view.View;%0Aimport android.view.View.OnClickListener;%0A
 import a
@@ -301,16 +301,45 @@
 xtView;%0A
+import android.widget.Toast;%0A
 %0A%0Apublic
@@ -378,16 +378,18 @@
 vity %7B%0A%0A
+%09%0A
 %09private
@@ -720,16 +720,25 @@
 _main);%0A
+        %0A
         
@@ -774,24 +774,571 @@
     
-%0A    %7D%0A    %0A    
+initilizeOnClickListener();%0A        %0A        %0A    %7D%0A    %0A    private void initilizeOnClickListener() %7B%0A    %09buttonRefresh.setOnClickListener(new OnClickListener() %7B%0A%09%09%09%0A%09%09%09@Override%0A%09%09%09public void onClick(View v) %7B%0A%09%09%09%09Toast.makeText(MainActivity.this, %22Refresh Button Is Pressed %22, Toast.LENGTH_LONG).show();%0A%09%09%09%7D%0A%09%09%7D);%0A    %09buttonSetWallpaper.setOnClickListener(new  OnClickListener() %7B%0A%09%09%09%0A%09%09%09@Override%0A%09%09%09public void onClick(View v) %7B%0A%09%09%09%09Toast.makeText(MainActivity.this, %22SetAsWallpaper Button Is Pressed %22, Toast.LENGTH_LONG).show();%0A%09%09%09%7D%0A%09%09%7D);%0A    %09%0A%09%7D%0A%0A%09
 priv

Set onClickListener on both buttons