Code example for LoaderManager

Methods: initLoader

0
     * entries. 
     * 
     * @param count the number of entries to add 
     */ 
    private void addEntriesToCallLog(final int count) {
        getLoaderManager().initLoader(CALLLOG_LOADER_ID, null, new CallLogLoaderListener(count));
    } 
 
    /** 
     * Calls when the insertion has completed. 
     * 
     * @param message the message to show in a toast to the user 
     */ 
    private void insertCompleted(String message) {
        // Hide the progress bar. 
        mProgressBar.setVisibility(View.GONE);
        // Re-enable the add button. 
        mNumberTextView.setEnabled(true);
        mAddButton.setEnabled(true);
        mNumberTextView.setText("");
        Toast.makeText(this, message, Toast.LENGTH_LONG).show();