Skip to content

Commit

Permalink
S04.02-Exercise-DisplayDayForecast
Browse files Browse the repository at this point in the history
  • Loading branch information
mlustig authored and Jeremy Silver committed Jan 19, 2017
1 parent ebe06b6 commit caf6e7e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!--COMPLETED (4) Configure DetailActivity's up button functionality-->
<activity
android:name=".DetailActivity"
android:parentActivityName=".MainActivity">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

// COMPLETED (1) Create a new Activity called DetailActivity using Android Studio's wizard
public class DetailActivity extends AppCompatActivity {

private static final String FORECAST_SHARE_HASHTAG = " #SunshineApp";
Expand All @@ -12,5 +11,7 @@ public class DetailActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);

// TODO (2) Display the weather forecast that was passed from MainActivity
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ private void loadWeatherData() {
@Override
public void onClick(String weatherForDay) {
Context context = this;
// COMPLETED (3) Remove the Toast and launch the DetailActivity using an explicit Intent
Class destinationClass = DetailActivity.class;
Intent intentToStartDetailActivity = new Intent(context, destinationClass);
// TODO (1) Pass the weather to the DetailActivity
startActivity(intentToStartDetailActivity);
}

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_detail.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--COMPLETED (2) Change the root layout of activity_detail.xml to a FrameLayout and remove unnecessary xml attributes-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand Down

0 comments on commit caf6e7e

Please sign in to comment.