-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
raulserranomena
|
||
|
3 comments
on commit 636e6bd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In sixth video you will face huge error because of oudated method
so, the out dated method is
getLoaderManager().initLoader(0, null, this);
you can use
LoaderManager.getInstance(this).initLoader(0, null, this); instead in 2020
/**
- @deprecated Use
- {@link LoaderManager#getInstance(LifecycleOwner) LoaderManager.getInstance(this)}.
*/
[/**
- @deprecated Use
- {@link LoaderManager#getInstance(LifecycleOwner) LoaderManager.getInstance(this)}.
*/](url)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In sixth video you will face huge error because of oudated method
so, the out dated method is
getLoaderManager().initLoader(0, null, this);
you can use
LoaderManager.getInstance(this).initLoader(0, null, this); instead in 2020
/*** @deprecated Use * {@link LoaderManager#getInstance(LifecycleOwner) LoaderManager.getInstance(this)}. */
[/**
* @deprecated Use * {@link LoaderManager#getInstance(LifecycleOwner) LoaderManager.getInstance(this)}. */](url)
i signed to this site to say thank you very much to you
Why didn't we set the visibility of emptyView into GONE and still disappears when there is some data in the cursor?