@Override public void onLoadFinished(Loader<List<Status>> loader, List<Status> data) { mStatusList = data; // if(newTweets > 0){ // mStatusList.add(newTweets,null); // } Log.e(TAG, "onLoadFinished"); mStatusAdapter.setData(data); if (mStatusList.isEmpty()) { noTweets.setVisibility(View.VISIBLE); mRecyclerView.setVisibility(View.GONE); } else { noTweets.setVisibility(View.GONE); mRecyclerView.setVisibility(View.VISIBLE); } // The list should now be shown. // if (isResumed()) { // Log.e(TAG, "setListShown"); // setListShown(true); // // } else { // Log.e(TAG, "setListNoAnimation"); // setListShownNoAnimation(true); // } }
@Override public void onLoaderReset(Loader<List<Status>> loader) { Log.e(TAG, "onLoaderReset"); mStatusAdapter.setData(null); }