diff --git a/app/src/main/java/com/example/android/pets/CatalogActivity.java b/app/src/main/java/com/example/android/pets/CatalogActivity.java index 728e4b34..7992ffbe 100755 --- a/app/src/main/java/com/example/android/pets/CatalogActivity.java +++ b/app/src/main/java/com/example/android/pets/CatalogActivity.java @@ -48,6 +48,13 @@ public void onClick(View view) { startActivity(intent); } }); + + // Find the ListView which will be populated with the pet data + ListView petListView = (ListView) findViewById(R.id.list); + + // Find and set empty view on the ListView, so that it only shows when the list has 0 items. + View emptyView = findViewById(R.id.empty_view); + petListView.setEmptyView(emptyView); } @Override diff --git a/app/src/main/res/layout/activity_catalog.xml b/app/src/main/res/layout/activity_catalog.xml index 5e7c77a0..94b0a93d 100755 --- a/app/src/main/res/layout/activity_catalog.xml +++ b/app/src/main/res/layout/activity_catalog.xml @@ -23,6 +23,44 @@ android:layout_width="match_parent" android:layout_height="match_parent"/> + + + + + + + + + + Delete All Pets + + It\'s a bit lonely here... + + + Get started by adding a pet + Add a Pet