コード例 #1
0
 private void getDataFromCache() {
   infors = mClient.selectAll();
   layout.setVisibility(View.VISIBLE);
   progressBar.setVisibility(View.GONE);
   adapter = new ProjectAccountAdapter(mContext, this.infors);
   adapter.setEmptyString(getEmptyString());
   mListView.setAdapter(adapter);
 }
コード例 #2
0
 @Override
 protected void callAfterDataBack(int TaskID) {
   switch (TaskID) {
     case TaskConstant.GET_ACCOUNT_DETAIL:
       progressBar.setVisibility(View.GONE);
       layout.setVisibility(View.VISIBLE);
       break;
   }
 }
コード例 #3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   setContentView(R.layout.activity_projectaccount);
   super.onCreate(savedInstanceState);
   mClient = ProjectAccount_DBClient.get(mContext);
   if (!mClient.isEmpty()) getDataFromCache();
   else {
     if (hasNetWork()) getInfor(0, "刷新");
     else {
       layout.setVisibility(View.VISIBLE);
       progressBar.setVisibility(View.GONE);
       adapter = new ProjectAccountAdapter(mContext, this.infors);
       adapter.setEmptyString(getEmptyString());
       mListView.setAdapter(adapter);
       XtomToastUtil.showShortToast(mContext, R.string.nonetwork);
       return;
     }
   }
 }
コード例 #4
0
 private void getDataFromCache() {
   infor = mClient.selectByPid(pid);
   layout.setVisibility(View.VISIBLE);
   progressBar.setVisibility(View.GONE);
   managedata();
 }