Exemple #1
0
 private void showNoData() {
   if (selectedIndex == SYSTEM_NOTICE) {
     if (noticeData.size() == 0) {
       layoutEmptyNotice.setVisibility(View.VISIBLE);
       layoutEmptyNotice.showNoDataPage(NO_NOTICE_DATA);
       noticeListView.setVisibility(View.GONE);
     }
   } else if (selectedIndex == USER_MESSAGE) {
     if (titleData.size() == 0) {
       layoutEmptyMessage.setVisibility(View.VISIBLE);
       layoutEmptyMessage.showNoDataPage(NO_MESSAGE_DATA);
       messageListView.setVisibility(View.GONE);
     }
   }
 }
Exemple #2
0
 private void showNetWorkErrorPage() {
   if (selectedIndex == SYSTEM_NOTICE) {
     if (noticeData.size() == 0) {
       layoutEmptyMessage.setVisibility(View.VISIBLE);
       layoutEmptyNotice.showNetErrorPage();
     } else {
       ViewUtil.showTipsToast(this, noNetTips);
       noticeListView.showFootText();
     }
   } else if (selectedIndex == USER_MESSAGE) {
     if (messageData.size() == 0) {
       layoutEmptyMessage.setVisibility(View.VISIBLE);
       layoutEmptyMessage.showNetErrorPage();
     } else {
       ViewUtil.showTipsToast(this, noNetTips);
       messageListView.showFootText();
     }
   }
 }
Exemple #3
0
 private void showFail() {
   if (selectedIndex == SYSTEM_NOTICE) {
     if (noticeData.size() == 0) {
       noticeListView.setVisibility(View.GONE);
       layoutEmptyNotice.setVisibility(View.VISIBLE);
       layoutEmptyNotice.showFailPage();
     } else {
       ViewUtil.showTipsToast(this, failTips);
       noticeListView.showFootText();
     }
   } else if (selectedIndex == USER_MESSAGE) {
     if (titleData.size() == 0) {
       messageListView.setVisibility(View.GONE);
       layoutEmptyMessage.setVisibility(View.VISIBLE);
       layoutEmptyMessage.showFailPage();
     } else {
       ViewUtil.showTipsToast(this, failTips);
       messageListView.showFootText();
     }
   }
 }
Exemple #4
0
  private void setupNoticeViews() {
    LayoutInflater inflater = getLayoutInflater();
    View viewNotice = inflater.inflate(R.layout.include_new_viewpager_listview, null);

    noticeListView = (AutoLoadListView) viewNotice.findViewById(R.id.listview);
    noticeListView.setOnLoadDataListener(this);
    layoutEmptyNotice = (EmptyLayout) viewNotice.findViewById(R.id.empty_layout);
    layoutEmptyNotice.setOnGetDataAgainListener(this);
    viewRefreshNotice = (RefreshLayout) viewNotice.findViewById(R.id.pull_refresh_view);
    viewRefreshNotice.setOnHeaderRefreshListener(this);

    viewList.add(viewNotice);
  }
Exemple #5
0
  private void setupMessageViews() {
    LayoutInflater inflater = getLayoutInflater();
    View viewMessage = inflater.inflate(R.layout.include_new_viewpager_expandable_listview, null);

    messageListView =
        (AutoLoadExpandableListView) viewMessage.findViewById(R.id.expandable_listview);
    messageListView.setOnLoadDataListener(this);
    layoutEmptyMessage = (EmptyLayout) viewMessage.findViewById(R.id.empty_layout);
    layoutEmptyMessage.setOnGetDataAgainListener(this);
    viewRefreshMessage = (RefreshLayout) viewMessage.findViewById(R.id.pull_refresh_view);
    viewRefreshMessage.setOnHeaderRefreshListener(this);

    viewList.add(viewMessage);
  }