package edu.usc.parknpay.owner;

import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;

import edu.usc.parknpay.R;
import edu.usc.parknpay.TemplateActivity;
import edu.usc.parknpay.database.User;

//import android.widget.Toolbar;

/**
 * Created by Bobo on 10/14/2016.
 */

public class PaymentInfoActivity extends TemplateActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.owner_payment_info);
        super.onCreateDrawer();
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                onBackPressed();
                return true;
        }
        return false;
    }

    public void addMoney(View view) {
        User.getInstance().changeBalance(100);
    }

    public void cashOut(View view) {
        double balance = User.getInstance().getBalance();
        User.getInstance().changeBalance(-1 * balance);
    }
}

@@ -107,16 +107,45 @@
 ew.View;
+%0Aimport android.widget.Toast;
 %0A%0Aimport
@@ -920,16 +920,130 @@
 e(100);%0A
+        Toast.makeText(PaymentInfoActivity.this, %22You've added $100 to your balance%22, Toast.LENGTH_SHORT).show();%0A
     %7D%0A%0A 
@@ -1188,20 +1188,148 @@
 * balance);%0A
+        Toast.makeText(PaymentInfoActivity.this, %22You withdrew $%22 + balance + %22 from your account%22, Toast.LENGTH_SHORT).show();%0A
     %7D%0A%7D%0A

Update Payment tab