package com.brmuncey.shortcutcalculator.View;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.brmuncey.shortcutcalculator.R;

import static com.brmuncey.shortcutcalculator.View.Toast.makeToast;

public class TipActivity extends AppCompatActivity {

    private Button calculate;
    private Button clear;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tip);
        setupButtons();
    }

    private void setupButtons() {
        calculate = (Button) findViewById(R.id.calculateBtn);
        clear = (Button) findViewById(R.id.clearBtn);

        calculate.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                makeToast(getActivity(),"Calculate");
            }
        });

        clear.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                makeToast(getActivity(),"Clear");
            }
        });

    }

    private Context getActivity() { return TipActivity.this; }
}

@@ -374,65 +374,8 @@
  %7B%0A%0A
-    private Button calculate;%0A    private Button clear;%0A%0A
     
@@ -597,32 +597,39 @@
 ons() %7B%0A        
+Button 
 calculate = (But
@@ -670,24 +670,31 @@
 n);%0A        
+Button 
 clear = (But

Refactor TipActivity.