RecyclerViewAdapter mRecyclerViewAdapter = new RecyclerViewAdapter(mListingDataList);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setAdapter(mRecyclerViewAdapter );
mRecyclerViewAdapter .registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
@Override
public void onChanged() {
super.onChanged();
if (null != mTabLayoutOh)
mTabLayoutOh.setVisibility(!mListingDataList.isEmpty() ? View.VISIBLE : View.GONE);
}
});
一目了然。