android.widget.ListView.setEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(146)

本文整理了Java中android.widget.ListView.setEnabled()方法的一些代码示例,展示了ListView.setEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setEnabled()方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:setEnabled

ListView.setEnabled介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

mListView.setEnabled(false);
v.animate().setDuration(duration).
    alpha(endAlpha).translationX(endX).
          mBackgroundContainer.hideBackground();
          mSwiping = false;
          mListView.setEnabled(true);
        mBackgroundContainer.hideBackground();
        mSwiping = false;
        mListView.setEnabled(true);
      mBackgroundContainer.hideBackground();
      mSwiping = false;
      mListView.setEnabled(true);

代码示例来源:origin: hezhubo/HPlayer

/**
 * 刷新列表UI
 */
private void setFileListUI(List<FileInfo> fileInfoList, int selection) {
  FileListAdapter adapter = new FileListAdapter(mContext, fileInfoList);
  mFileList.setAdapter(adapter);
  mFileList.setSelection(selection);
  mFolderPath.setText(currentPath);
  mBackPrevious.setEnabled(true);
  mFileList.setEnabled(true);
}

代码示例来源:origin: hezhubo/HPlayer

/**
 * 开始搜索文件
 */
private void startSearch() {
  mSearchFileTask = new SearchFileTask();
  mSearchFileTask.execute(currentPath);
  mBackPrevious.setEnabled(false);
  mFileList.setEnabled(false);
}

代码示例来源:origin: stackoverflow.com

lv.setEnabled(true);
lv.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
lv.setItemChecked(getValueIndex() + 1, true);

代码示例来源:origin: gizwits/GOpenSource_AppKit_Android_AS

@Override
  public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
    GizWifiDevice wifiDevice = list.get(arg2);
    GizDeviceSharingUserRole sharingRole = wifiDevice.getSharingRole();
    int role = sharingRole.ordinal();
    boolean isgetsharing = false;
    if (role == 2) {
      isgetsharing = true;
    }
    mListView.setEnabled(false);
    mListView.postDelayed(new Runnable() {
      @Override
      public void run() {
        mListView.setEnabled(true);
      }
    }, 1000);
    
    Intent tent = new Intent(getActivity(), SharedDeviceManagerActivity.class);
    GosConstant.mybindUsers.clear();
    GosConstant.mydeviceSharingInfos.clear();
    tent.putExtra("productname", wifiDevice.getProductName());
    tent.putExtra("deviceid", wifiDevice.getDid());
    tent.putExtra("isgetsharing", isgetsharing);
    startActivity(tent);
  }
});

代码示例来源:origin: stackoverflow.com

lstdetail.setAdapter(dadapter);
dadapter.notifyDataSetChanged();
lstdetail.setEnabled(true);

代码示例来源:origin: stackoverflow.com

mListView.setEnabled(false);
v.animate().setDuration(duration).
    alpha(endAlpha).translationX(endX).
          mBackgroundContainer.hideBackground();
          mSwiping = false;
          mListView.setEnabled(true);
        mBackgroundContainer.hideBackground();
        mSwiping = false;
        mListView.setEnabled(true);
      mBackgroundContainer.hideBackground();
      mSwiping = false;
      mListView.setEnabled(true);

代码示例来源:origin: Ramotion/direct-select-android

private void showListView() {
  if (animationInProgress || scrollInProgress || listViewIsShown) return;
  listView.setEnabled(true);
  animationInProgress = true;
  this.setVisibility(View.VISIBLE);
  this.bringToFront();
  this.readyToHide = false;
  // Scale picker box if animations enabled
  if (selectorAnimationsEnabled && null != this.pickerBox) {
    ScaleAnimation scaleAnimation = new ScaleAnimation(1f, 1f + scaleFactorDelta, 1f, 1f + scaleFactorDelta,
        Animation.RELATIVE_TO_SELF, selectorAnimationCenterPivot ? 0.5f : 0f, Animation.RELATIVE_TO_SELF, 0.5f);
    scaleAnimation.setInterpolator(new AccelerateInterpolator());
    scaleAnimation.setDuration(100);
    scaleAnimation.setFillAfter(true);
    this.pickerBox.getCellRoot().startAnimation(scaleAnimation);
  }
  // Show picker view animation
  AlphaAnimation showAnimation = new AlphaAnimation(0f, 1f);
  showAnimation.setDuration(200);
  showAnimation.setInterpolator(new AccelerateInterpolator());
  showAnimation.setAnimationListener(new AnimationListenerAdapter() {
    @Override
    public void onAnimationEnd(Animation animation) {
      animationInProgress = false;
      listViewIsShown = true;
      hideListView();
    }
  });
  this.startAnimation(showAnimation);
}

代码示例来源:origin: Ramotion/direct-select-android

private void hideListView() {
  if (!readyToHide || animationInProgress || scrollInProgress || !listViewIsShown) return;
  readyToHide = false;
  animationInProgress = true;
  listView.setEnabled(false);
  this.setVisibility(View.INVISIBLE);
  this.pickerBox.onSelect(adapter.getItem(selectedItem), selectedItem);
  AlphaAnimation hideAnimation = new AlphaAnimation(1f, 0f);
  hideAnimation.setStartOffset(subScrollDuration);
  hideAnimation.setDuration(200);
  hideAnimation.setInterpolator(new DecelerateInterpolator());
  hideAnimation.setAnimationListener(new AnimationListenerAdapter() {
    @Override
    public void onAnimationEnd(Animation animation) {
      listViewIsShown = false;
      animationInProgress = false;
    }
  });
  DSListView.this.startAnimation(hideAnimation);
  // Scale picker box text animation if animations enabled
  if (selectorAnimationsEnabled && null != this.pickerBox) {
    ScaleAnimation scaleAnimation = new ScaleAnimation(1f + scaleFactorDelta, 1f, 1f + scaleFactorDelta, 1f,
        Animation.RELATIVE_TO_SELF, selectorAnimationCenterPivot ? 0.5f : 0f, Animation.RELATIVE_TO_SELF, 0.5f);
    scaleAnimation.setInterpolator(new DecelerateInterpolator());
    scaleAnimation.setStartOffset(100 + subScrollDuration);
    scaleAnimation.setDuration(100);
    scaleAnimation.setFillAfter(true);
    this.pickerBox.getCellRoot().startAnimation(scaleAnimation);
  }
}

相关文章

ListView类方法