├── DinnerApp_BEGIN ├── .gitignore ├── .idea │ ├── .name │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── scopes │ │ └── scope_settings.xml │ └── vcs.xml ├── app │ ├── .gitignore │ ├── app.iml │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ └── ApplicationTest.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ ├── Dinner.java │ │ │ ├── MainActivity.java │ │ │ ├── OrderDinnerActivity.java │ │ │ ├── RemoveMealActivity.java │ │ │ ├── ShowDinnerActivity.java │ │ │ ├── ShowRecipeActivity.java │ │ │ ├── UseInfoBoxFragment.java │ │ │ └── Utility.java │ │ └── res │ │ ├── drawable │ │ ├── button_solid_rounded_corners.xml │ │ ├── dinner_row.xml │ │ ├── rectangle.xml │ │ └── rectangle_solid.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── show_dinner_suggestion.xml │ │ └── show_info.xml │ │ ├── menu │ │ ├── food_prefs_menu.xml │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── DinnerApp_FINAL ├── .gitignore ├── .idea │ ├── .name │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── dictionaries │ │ └── googleudacity.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── scopes │ │ └── scope_settings.xml │ └── vcs.xml ├── DinnerApp_FINAL.iml ├── app │ ├── .gitignore │ ├── app.iml │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ └── ApplicationTest.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ ├── Dinner.java │ │ │ ├── MainActivity.java │ │ │ ├── MyApplication.java │ │ │ ├── OrderDinnerActivity.java │ │ │ ├── RemoveMealActivity.java │ │ │ ├── ShowAllDinnersActivity.java │ │ │ ├── ShowDailySpecialActivity.java │ │ │ ├── ShowDinnerActivity.java │ │ │ ├── ShowRecipeActivity.java │ │ │ ├── UseInfoBoxFragment.java │ │ │ └── Utility.java │ │ └── res │ │ ├── drawable │ │ ├── button_solid_rounded_corners.xml │ │ ├── dinner_row.xml │ │ ├── rectangle.xml │ │ └── rectangle_solid.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── list_all_dinners.xml │ │ ├── order_dinner.xml │ │ ├── show_daily_special.xml │ │ ├── show_dinner_in_row.xml │ │ ├── show_dinner_suggestion.xml │ │ └── show_info.xml │ │ ├── menu │ │ ├── food_prefs_menu.xml │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── raw │ │ └── gtm_default │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── track_app.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── DinnerApp_part2_start ├── .gitignore ├── .idea │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── dictionaries │ │ └── googleudacity.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── scopes │ │ └── scope_settings.xml │ └── vcs.xml ├── app │ ├── .gitignore │ ├── app.iml │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ ├── Dinner.java │ │ │ ├── MainActivity.java │ │ │ ├── MyApplication.java │ │ │ ├── OrderDinnerActivity.java │ │ │ ├── RemoveMealActivity.java │ │ │ ├── ShowDinnerActivity.java │ │ │ ├── ShowRecipeActivity.java │ │ │ ├── UseInfoBoxFragment.java │ │ │ └── Utility.java │ │ └── res │ │ ├── drawable │ │ ├── button_solid_rounded_corners.xml │ │ ├── dinner_row.xml │ │ ├── rectangle.xml │ │ └── rectangle_solid.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── show_dinner_suggestion.xml │ │ └── show_info.xml │ │ ├── menu │ │ ├── food_prefs_menu.xml │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── track_app.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── DinnerApp_part3_start ├── .gitignore ├── .idea │ ├── .name │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── dictionaries │ │ └── googleudacity.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── scopes │ │ └── scope_settings.xml │ └── vcs.xml ├── app │ ├── .gitignore │ ├── app.iml │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ └── ApplicationTest.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ ├── Dinner.java │ │ │ ├── MainActivity.java │ │ │ ├── MyApplication.java │ │ │ ├── OrderDinnerActivity.java │ │ │ ├── RemoveMealActivity.java │ │ │ ├── ShowAllDinnersActivity.java │ │ │ ├── ShowDinnerActivity.java │ │ │ ├── ShowRecipeActivity.java │ │ │ ├── UseInfoBoxFragment.java │ │ │ └── Utility.java │ │ └── res │ │ ├── drawable │ │ ├── button_solid_rounded_corners.xml │ │ ├── dinner_row.xml │ │ ├── rectangle.xml │ │ └── rectangle_solid.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── list_all_dinners.xml │ │ ├── order_dinner.xml │ │ ├── show_dinner_in_row.xml │ │ ├── show_dinner_suggestion.xml │ │ └── show_info.xml │ │ ├── menu │ │ ├── food_prefs_menu.xml │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── track_app.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── DinnerApp_part4_start ├── .gitignore ├── .idea │ ├── .name │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── dictionaries │ │ └── googleudacity.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── scopes │ │ └── scope_settings.xml │ └── vcs.xml ├── app │ ├── .gitignore │ ├── app.iml │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ └── ApplicationTest.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── dinnerapp │ │ │ ├── Dinner.java │ │ │ ├── MainActivity.java │ │ │ ├── MyApplication.java │ │ │ ├── OrderDinnerActivity.java │ │ │ ├── RemoveMealActivity.java │ │ │ ├── ShowAllDinnersActivity.java │ │ │ ├── ShowDailySpecialActivity.java │ │ │ ├── ShowDinnerActivity.java │ │ │ ├── ShowRecipeActivity.java │ │ │ ├── UseInfoBoxFragment.java │ │ │ └── Utility.java │ │ └── res │ │ ├── drawable │ │ ├── button_solid_rounded_corners.xml │ │ ├── dinner_row.xml │ │ ├── rectangle.xml │ │ └── rectangle_solid.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── list_all_dinners.xml │ │ ├── order_dinner.xml │ │ ├── show_daily_special.xml │ │ ├── show_dinner_in_row.xml │ │ ├── show_dinner_suggestion.xml │ │ └── show_info.xml │ │ ├── menu │ │ ├── food_prefs_menu.xml │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── raw │ │ └── gtm_default │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── track_app.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle └── README.md /DinnerApp_BEGIN/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/.name: -------------------------------------------------------------------------------- 1 | DinnerApp -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 21 5 | buildToolsVersion "21.1.2" 6 | 7 | defaultConfig { 8 | applicationId "com.example.android.dinnerapp" 9 | minSdkVersion 18 10 | targetSdkVersion 21 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | compile 'com.android.support:appcompat-v7:21.0.3' 25 | compile 'com.google.android.gms:play-services:6.5.+' 26 | } 27 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/jocelyn/AndroidSDK/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/androidTest/java/com/example/android/dinnerapp/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.example.android.dinnerapp; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 29 | 30 | 34 | 37 | 38 | 39 | 43 | 46 | 47 | 48 | 52 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/java/com/example/android/dinnerapp/OrderDinnerActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.dinnerapp; 18 | 19 | import android.app.Activity; 20 | import android.os.Bundle; 21 | import android.widget.TextView; 22 | 23 | 24 | public class OrderDinnerActivity extends Activity { 25 | String selectedDinnerExtrasKey = String.valueOf(R.string.selected_dinner); 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.show_info); 31 | } 32 | 33 | protected void onStart() { 34 | super.onStart(); 35 | 36 | // Set the heading 37 | TextView heading_tv = (TextView) findViewById(R.id.textView_info_heading); 38 | heading_tv.setText(getResources().getText(R.string.order_online_heading)); 39 | 40 | // Set the text 41 | TextView tv = (TextView) findViewById(R.id.textView_info); 42 | 43 | String dinner = getIntent().getStringExtra(selectedDinnerExtrasKey); 44 | tv.setText("This is where you will order the selected dinner: \n\n" + 45 | dinner); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/java/com/example/android/dinnerapp/RemoveMealActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.dinnerapp; 18 | 19 | import android.app.Activity; 20 | import android.os.Bundle; 21 | import android.widget.TextView; 22 | 23 | 24 | public class RemoveMealActivity extends Activity { 25 | String selectedDinnerExtrasKey = String.valueOf(R.string.selected_dinner); 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.show_info); 31 | } 32 | 33 | protected void onStart() { 34 | super.onStart(); 35 | 36 | // Set the heading 37 | TextView heading_tv = (TextView) findViewById(R.id.textView_info_heading); 38 | heading_tv.setText(getResources().getText(R.string.dislike_dinner_heading)); 39 | 40 | // Set the text 41 | TextView tv = (TextView) findViewById(R.id.textView_info); 42 | String dinner = getIntent().getStringExtra(selectedDinnerExtrasKey); 43 | tv.setText(dinner + " \n\n" + getResources().getText(R.string.dislike_dinner)); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/java/com/example/android/dinnerapp/ShowRecipeActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.dinnerapp; 18 | 19 | import android.app.Activity; 20 | import android.os.Bundle; 21 | import android.widget.TextView; 22 | 23 | 24 | public class ShowRecipeActivity extends Activity { 25 | 26 | String selectedDinnerExtrasKey = String.valueOf(R.string.selected_dinner); 27 | 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | setContentView(R.layout.show_info); 32 | 33 | } 34 | 35 | protected void onStart() { 36 | super.onStart(); 37 | 38 | // Set the heading 39 | TextView heading_tv = (TextView) findViewById(R.id.textView_info_heading); 40 | heading_tv.setText(getResources().getText(R.string.show_recipe_heading)); 41 | 42 | // Set the text 43 | TextView tv = (TextView) findViewById(R.id.textView_info); 44 | String dinner = getIntent().getStringExtra(selectedDinnerExtrasKey); 45 | tv.setText(dinner + "\n\n" + getResources().getText(R.string.recipe)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/java/com/example/android/dinnerapp/UseInfoBoxFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.dinnerapp; 18 | 19 | import android.os.Bundle; 20 | import android.view.LayoutInflater; 21 | import android.view.View; 22 | import android.view.ViewGroup; 23 | import android.app.Fragment; 24 | 25 | /** 26 | * Created by jocelyn on 3/12/15. 27 | */ 28 | 29 | /* 30 | * This fragment displays an info box with a solid heading 31 | */ 32 | public class UseInfoBoxFragment extends Fragment{ 33 | @Override 34 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 35 | Bundle savedInstanceState) { 36 | // Inflate the layout for this fragment 37 | return inflater.inflate(R.layout.show_info, container, false); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/java/com/example/android/dinnerapp/Utility.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.dinnerapp; 18 | 19 | import android.content.Context; 20 | import android.widget.Toast; 21 | 22 | /** 23 | * Created by jocelyn on 12/10/14. 24 | */ 25 | public class Utility { 26 | 27 | public static void showMyToast (String toastText, Context appContext) { 28 | 29 | // Show a toast with tonights dinner 30 | // Context context = getApplicationContext(); 31 | // CharSequence text = "Hello toast!"; 32 | int duration = Toast.LENGTH_SHORT; 33 | 34 | Toast toast = Toast.makeText(appContext, toastText, duration); 35 | toast.show(); 36 | 37 | } 38 | 39 | public static String[] combine(String[] a, String[] b){ 40 | int length = a.length + b.length; 41 | String[] result = new String[length]; 42 | System.arraycopy(a, 0, result, 0, a.length); 43 | System.arraycopy(b, 0, result, a.length, b.length); 44 | return result; 45 | } 46 | 47 | public static String[] combine(String[] a, String[] b, String[] c, String[] d){ 48 | return combine(combine(a, b), combine(c, d)); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/res/drawable/button_solid_rounded_corners.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/res/drawable/dinner_row.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/res/drawable/rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/res/drawable/rectangle_solid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DinnerApp_BEGIN/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 |