Ejemplo n.º 1
0
 @Override
 public final void run() {
   // TODO Auto-generated method stub
   try {
     P.v("event", "start Event=" + this.getClass().getName());
     ok();
   } catch (Exception e) {
     e.printStackTrace();
   }
   P.v("event", "end Event=" + this.getClass().getName());
 }
Ejemplo n.º 2
0
        public void ok() {
          P.v("SearchResult getKey()=" + getKey());

          switch (getKey()) {
            case Const.cmd_LoadSDFile_Error:
              // pbLoading.setVisibility(View.GONE);
              break;
            case Const.cmd_LoadSDFile_Init:
              // Long value=(Long)getValue();
              // pbSDFileStatus.setMax(value.intValue());
              // pbSDFileStatus.setProgress(0);
              // tvMessage.setText("正在遍历文件...");
              // pbSDFileMsg.setVisibility(View.GONE);
              break;
            case Const.cmd_LoadSDFile_Start:
              // pbLoading.setVisibility(View.VISIBLE);
              // tvMessage.setText("正在获取文件数,请耐心等待!\n根据SD卡空间大小的不同遍历时间不等");
              // mListView.setVisibility(View.GONE);
              // mGridView.setVisibility(View.GONE);
              // btRefresh.setVisibility(View.GONE);
              // pbSDFileMsg.setVisibility(View.GONE);
              break;
            case Const.cmd_LoadSDFile_State:
              // fileAdapter.notifyDataSetChanged();
              // LoadSDFileEvent.LoadSDFile_State staValue =
              // (LoadSDFileEvent.LoadSDFile_State) getValue();
              // pbSDFileStatus.setProgress(staValue.Progress);
              // pbSDFileStatus.setMax(staValue.count);
              // tvMessage.setText(staValue.strPath);
              break;
            case Const.cmd_LoadSDFile_Finish:
              // pbLoading.setVisibility(View.GONE);
              // SwitchStyle(bFlag, bStyle);
              etValue.setText(param.getSearchValue());
              btSearch.setEnabled(true);
              ResultFilter();
              // mFileListFilter.clear();
              // mFileListFilter.addAll(param.getSearchItems());
              // fileAdapter.notifyDataSetChanged();
              // Toast.makeText(m_act,
              // m_act.getString(R.string.msg_Scan_Finish),
              // Toast.LENGTH_SHORT).show();
              break;
          }
        }
Ejemplo n.º 3
0
 public int SwitchPage(final int key, Object obj) {
   // P.v("SwitchPage(final int key="+key);
   if (m_curPage != null) {
     nLastKey = key;
     m_curPage.onPause();
     m_curPage.onExit();
   }
   if (btOldButton != null) {
     btOldButton.setBackgroundResource(R.drawable.tab_normal);
     // btOldButton.setTextColor(m_act.getResources().getColor(
     // R.color.tab_TextColor_normal));
   }
   MultiItemPage tempPage = m_localPage;
   View btTemp = btLocal;
   switch (key) {
     case Search:
       tempPage = m_SearchPage;
       btTemp = null;
       break;
     case Local:
       btTemp = btLocal;
       // MobclickAgent.onEvent(m_act,"KMainPage","localPage");
       tempPage = m_localPage;
       break;
     case NetWork:
       // btTemp = btRemote;
       // MobclickAgent.onEvent(m_act,"KMainPage","networkPage");
       // tempPage = m_RemotePage;
       break;
     case Favorite:
       btTemp = btFavorite;
       // MobclickAgent.onEvent(m_act,"KMainPage","favoritePage");
       tempPage = m_FavoritePage;
       break;
     case apps:
       btTemp = btApps;
       // MobclickAgent.onEvent(m_act,"KMainPage","appPage");
       tempPage = m_AppsPage;
       break;
       //		case task:
       //			btTemp = btTask;
       //			tempPage = m_TaskPage;
       //			break;
     case tools:
       btTemp = btTools;
       tempPage = m_ToolsPage;
       break;
   }
   if (btTemp != null) btTemp.setBackgroundResource(R.drawable.tab_select);
   // btTemp.setTextColor(m_act.getResources().getColor(
   // R.color.tab_TextColor_selected));
   btOldButton = btTemp;
   if (obj != null) {
     tempPage.setObj(obj);
   }
   if (tempPage != null) {
     if (!tempPage.isCreate()) {
       tempPage.onCreate();
       tempPage.onLoad();
     }
     m_curPage = tempPage;
     tempPage.onResume();
     tempPage.onReload();
     // temp.onCreateOptionsMenu(menu);
     this.postInvalidate();
     return 1;
   } else {
     P.v(key + ":未找到相应的窗体");
   }
   return 0;
 }