diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..b106be90 Binary files /dev/null and b/.DS_Store differ diff --git a/exercises/.DS_Store b/exercises/.DS_Store new file mode 100644 index 00000000..e7d1e857 Binary files /dev/null and b/exercises/.DS_Store differ diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/DialerActivity.java b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/DialerActivity.java deleted file mode 100644 index 09e62463..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/DialerActivity.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.example.accesscode.myphone; - -import android.app.Activity; -import android.os.Bundle; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; - -/** - * Created by amyquispe on 4/30/15. - */ -public class DialerActivity extends Activity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_dialer); - Button callButton = (Button) findViewById(R.id.call_button); - final EditText dialerText = (EditText) findViewById(R.id.dialer_text); - callButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - /* get text input */ - String phoneNumber = dialerText.getText().toString(); - - /* - Use an implicit intent to open the user's phone app to call this number. - http://developer.android.com/guide/components/intents-common.html#Phone - */ - } - }); - } -} diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/EmailActivity.java b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/EmailActivity.java deleted file mode 100644 index 24934ce9..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/EmailActivity.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.example.accesscode.myphone; - -import android.app.Activity; -import android.os.Bundle; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; - -/** - * Created by amyquispe on 4/30/15. - */ -public class EmailActivity extends Activity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_email); - final EditText emailSubject = (EditText) findViewById(R.id.email_subject); - final EditText emailBody = (EditText) findViewById(R.id.email_body); - Button mailButton = (Button) findViewById(R.id.mail_button); - mailButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - String myEmailAddress = ""; /* put your email address here */ - String subject = emailSubject.getText().toString(); - String body = emailBody.getText().toString(); - - /* - Use an implicit intent to open up the user's email program and send - and email with this subject and body to you. - - http://developer.android.com/guide/components/intents-common.html#Email - - */ - } - }); - } -} diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/MainActivity.java b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/MainActivity.java deleted file mode 100644 index 2e0460c9..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/MainActivity.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.example.accesscode.myphone; - -import android.support.v7.app.ActionBarActivity; -import android.os.Bundle; -import android.view.Menu; -import android.view.MenuItem; -import android.view.View; -import android.widget.Button; -import android.widget.Toast; - - -public class MainActivity extends ActionBarActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - /* DialerActivity */ - Button dialerButton = (Button) findViewById(R.id.dialer_button); - dialerButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Toast.makeText(getApplicationContext(), "Dialer clicked", Toast.LENGTH_SHORT).show(); - /* - Use Explicit Intent to start DialerActivity here. - */ - } - }); - /* EmailActivity */ - Button emailButton = (Button) findViewById(R.id.email_button); - emailButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Toast.makeText(getApplicationContext(), "Email clicked", Toast.LENGTH_SHORT).show(); - /* - Use Explicit Intent to start EmailActivity here. - */ - - } - }); - } - - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.menu_main, menu); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - // Handle action bar item clicks here. The action bar will - // automatically handle clicks on the Home/Up button, so long - // as you specify a parent activity in AndroidManifest.xml. - int id = item.getItemId(); - - //noinspection SimplifiableIfStatement - if (id == R.id.action_settings) { - return true; - } - - return super.onOptionsItemSelected(item); - } -} diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/res/layout/activity_dialer.xml b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/res/layout/activity_dialer.xml deleted file mode 100644 index d4bc14d3..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/res/layout/activity_dialer.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -