1

我的列表视图上有快速操作。有什么方法可以在按下其中一个操作时更改视图是我的尝试,但我无法让它工作:

mQuickActionFolder.setOnActionItemClickListener(new QuickActionFolder.OnActionItemClickListener() {
   public void onItemClick(QuickActionFolder quickActionFolder,
     int position, int actionId,AdapterView<?> parent, View view) {
    // TODO Auto-generated method stub
    ActionItem actionItem = quickActionFolder.getActionItem(position);
    Log.v(TAG, "action id "+actionId);

    if (actionId == ID_OPEN) { // Add item selected
     Log.v(TAG, "you typed here");
     if (isOnline()) {
      mSelectedRow = position; // set the selected row
      if (!((listUrl[position].substring(listUrl[position]
        .length() - 1)).equals("/"))) {

       Log.d("new url", baseUrl);

       mFileUrl = baseUrl + listUrl[position];
       mQuickAction.show(view);
       }
       else if (((listUrl[position].substring(listUrl[position]
         .length() - 1)).equals("/"))) {
        Log.d("new url", baseUrl);

        mFileUrl = baseUrl + listUrl[position];
        mQuickActionFolder.show(view);


      } else {
       url = baseUrl
         + listUrl[position].substring(0,
           listUrl[position].length() - 1);

       Log.d("full Url", url);

       mListView.setEnabled(false);

       mProgress.setVisibility(View.VISIBLE);

       new ListAllFiles().execute();

      }
      if (url.equals(mainUrl)) {
       mListBack.setVisibility(View.GONE);
      } else {
       // mListBack.setVisibility(View.VISIBLE);
      }
     } else {
      WebNetworkAlert();
     }

    }

这段代码中的问题,它在 Eclipse 中总是说我要实现该方法,你能帮我弄清楚如何在快速操作中进行更改视图

4

0 回答 0