android.widget.ListAdapter.isEmpty()方法的使用及代码示例

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

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

ListAdapter.isEmpty介绍

暂无

代码示例

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

/**
 * @return True if this adapter doesn't contain any data.  This is used to determine
 * whether the empty view should be displayed.  A typical implementation will return
 * getCount() == 0 but since getCount() includes the headers and footers, specialized
 * adapters might want a different behavior.
 */
@Override
public boolean isEmpty() {
  return (mAdapter == null || mAdapter.isEmpty());
}

代码示例来源:origin: chentao0707/SimplifyReader

@Override
public boolean isEmpty() {
  return (mAdapter == null || mAdapter.isEmpty());
}

代码示例来源:origin: liaohuqiu/android-GridViewWithHeaderAndFooter

/**
 * @return true if this adapter doesn't contain any data.  This is used to determine
 * whether the empty view should be displayed.  A typical implementation will return
 * getCount() == 0 but since getCount() includes the headers and footers, specialized
 * adapters might want a different behavior.
 */
@Override
public boolean isEmpty() {
  return (mAdapter == null || mAdapter.isEmpty());
}

代码示例来源:origin: chentao0707/SimplifyReader

public boolean isEmpty() {
  return mAdapter == null || mAdapter.isEmpty();
}

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

if (heightMode != MeasureSpec.EXACTLY) {
  ListAdapter listAdapter = getAdapter();
  if (listAdapter != null && !listAdapter.isEmpty()) {
    int listPosition = 0;
    for (listPosition = 0; listPosition < listAdapter.getCount()

代码示例来源:origin: UweTrottmann/SeriesGuide

@Override
public boolean isEmpty() {
  return mAdapter.isEmpty();
}

代码示例来源:origin: Neamar/KISS

@Override
public boolean onSingleTapUp(MotionEvent e) {
  // if minimalistic mode is enabled,
  // and we want to display history on touch
  if (isMinimalisticModeEnabled() && prefs.getBoolean("history-onclick", false)) {
    // and we're currently in minimalistic mode with no results,
    // and we're not looking at the app list
    if ((mainActivity.isViewingSearchResults()) && (mainActivity.searchEditText.getText().toString().isEmpty())) {
      if ((mainActivity.list.getAdapter() == null) || (mainActivity.list.getAdapter().isEmpty())) {
        mainActivity.runTask(new HistorySearcher(mainActivity));
      }
    }
  }
  if (isMinimalisticModeEnabledForFavorites()) {
    mainActivity.favoritesBar.setVisibility(View.VISIBLE);
  }
  return super.onSingleTapConfirmed(e);
}

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

return originalAdapter.isEmpty();

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
public boolean isEmpty() {
  return mAdapter.isEmpty();
}

代码示例来源:origin: zzkong/BaseProject

/**
 * @return true if this adapter doesn't contain any data.  This is used to determine
 * whether the empty view should be displayed.  A typical implementation will return
 * getCount() == 0 but since getCount() includes the headers and footers, specialized
 * adapters might want a different behavior.
 */
@Override
public boolean isEmpty() {
  return (mAdapter == null || mAdapter.isEmpty());
}

代码示例来源:origin: vanilla-music/vanilla

@Override
public boolean isEmpty() {
  return mAdapter.isEmpty();
}

代码示例来源:origin: devinhu/androidone

@Override
public boolean isEmpty() {
  return mAdapter.isEmpty();
}

代码示例来源:origin: sealtalk/sealtalk-android

/**
 * Checks if the edge glow should be used enabled.
 * The glow is not enabled unless there are more views than can fit on the screen at one time.
 */
private boolean isEdgeGlowEnabled() {
  if (mAdapter == null || mAdapter.isEmpty()) return false;
  // If the maxx is more then zero then the user can scroll, so the edge effects should be shown
  return mMaxX > 0;
}

代码示例来源:origin: jinguangyue/Android-CustomCamera

/**
 * Checks if the edge glow should be used enabled.
 * The glow is not enabled unless there are more views than can fit on the screen at one time.
 */
private boolean isEdgeGlowEnabled() {
  if (mAdapter == null || mAdapter.isEmpty()) return false;
  // If the maxx is more then zero then the user can scroll, so the edge effects should be shown
  return mMaxX > 0;
}

代码示例来源:origin: com.albedinsky.android/ui-widget-adapter

/**
 */
@Override
public boolean isEmpty() {
  return mAdapter.isEmpty();
}

代码示例来源:origin: pmarks-net/chromadoze

@Override
public boolean isEmpty() {
  return mAdapter.isEmpty();
}

代码示例来源:origin: AndBible/and-bible

@Override
  public boolean isEmpty() {
    return getWrappedAdapter().isEmpty();
  }
}

代码示例来源:origin: tianshaojie/AndroidFine

if (!mListViewExtrasEnabled || !getShowViewWhileRefreshing() || null == adapter || adapter.isEmpty()) {
  super.onRefreshing(doScroll);
  return;

代码示例来源:origin: heinrichreimer/material-drawer

/**
 * Sets the view to show if the adapter is empty
 */
public void setEmptyView(View emptyView) {
  mEmptyView = emptyView;
  final ListAdapter adapter = getAdapter();
  final boolean empty = ((adapter == null) || adapter.isEmpty());
  updateEmptyStatus(empty);
}

代码示例来源:origin: heinrichreimer/material-drawer

private void setupChildren() {
  removeAllViews();
  updateEmptyStatus((mAdapter == null) || mAdapter.isEmpty());
  if (mAdapter == null) {
    return;
  }
  for (int i = 0; i < mAdapter.getCount(); i++) {
    View child = mAdapter.getView(i, null, this);
    if (mAreAllItemsSelectable || mAdapter.isEnabled(i)) {
      child.setOnClickListener(new InternalOnClickListener(i));
    }
    addViewInLayout(child, -1, child.getLayoutParams(), true);
  }
}

相关文章