package com.example.patrice.preferences;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

// https://examples.javacodegeeks.com/android/core/app/activity-app/android-startactivityforresult-example/

// http://www.android-examples.com/android-startactivityforresult-example-tutorial/

public class activity_send_data extends Activity
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_send_data_view);

        Toast.makeText(this, "fdgdgh...", Toast.LENGTH_LONG).show();

    }

    public void redBackground(View v)
    {

        Intent intent = new Intent(this, activity_receive_data.class);

        //the extra is a String that tell the background color choice
        intent.putExtra("color","red");

        //we start ActivityTwo with the above extra value
        startActivityForResult(intent,1);
       // finish();
    }



}
