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

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

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

ListView.setOverScrollMode介绍

暂无

代码示例

代码示例来源:origin: baiyuliang/QRobot

/**
 * 防止滑动listView到顶部或底部时出现蓝边现象
 *
 * @param listView
 */
public static void setOverScrollMode(ListView listView) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO)
    listView.setOverScrollMode(View.OVER_SCROLL_NEVER);
}

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

mAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, getList(25));
mListView.setAdapter(mAdapter);
mListView.setOverScrollMode(View.OVER_SCROLL_NEVER);
if(Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD || Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD_MR1){
  mListView.setOnScrollListener(new OnScrollListener(){

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

list1.setOverScrollMode(ListView.OVER_SCROLL_NEVER);
list2.setOverScrollMode(ListView.OVER_SCROLL_NEVER);

代码示例来源:origin: smuyyh/SprintNBA

mListView.setOverScrollMode(View.OVER_SCROLL_NEVER);
mListView.setDivider(null);
addView(mListView, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

代码示例来源:origin: AriesHoo/UIWidget

private void createList() {
  if (mListHeaderViews == null && mListFooterViews == null && mListItem == null) {
    return;
  }
  mLvContainer = new ListView(mContext);
  mLvContainer.setLayoutParams(new LinearLayout.LayoutParams(
      ViewGroup.LayoutParams.MATCH_PARENT, 0, 1.0f));
  mLLayoutRoot.addView(mLvContainer);
  //设置ListView相关
  mLvContainer.setId(R.id.lv_containerActionSheetDialog);
  mLvContainer.setVerticalScrollBarEnabled(false);
  mLvContainer.setOverScrollMode(View.OVER_SCROLL_NEVER);
  if (mListHeaderViews != null) {
    for (View v : mListHeaderViews) {
      mLvContainer.addHeaderView(v);
    }
  }
  if (mListFooterViews != null) {
    for (View v : mListFooterViews) {
      mLvContainer.addFooterView(v);
    }
  }
  mLvContainer.setDivider(DrawableUtil.getNewDrawable(mItemsDivider));
  mLvContainer.setDividerHeight(mItemsDividerHeight);
  mLvContainer.setAdapter(mAdapter);
}

代码示例来源:origin: behindeye/WxPhoneNumberHelper

private void init(final Context context, String title, String[] items, int selectedIndex) {
  listView = new ListView(context);
  listView.setFadingEdgeLength(0);
  listView.setOverScrollMode(View.OVER_SCROLL_NEVER);
  listView.setCacheColorHint(Color.TRANSPARENT);
  listView.setDivider(new ColorDrawable(context.getResources().getColor(R.color.line_color)));

代码示例来源:origin: xyxyLiu/Edit-Spinner

public void showDropDown() {
  if (mPopup.getAnchorView() == null) {
    if (mDropDownAnchorId != View.NO_ID) {
      mPopup.setAnchorView(getRootView().findViewById(mDropDownAnchorId));
    } else {
      mPopup.setAnchorView(this);
    }
  }
  if (!isPopupShowing()) {
    // Make sure the list does not obscure the IME when shown for the first time.
    mPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED);
  }
  requestFocus();
  mPopup.show();
  mPopup.getListView().setOverScrollMode(View.OVER_SCROLL_ALWAYS);
  if (mOnShowListener != null) {
    mOnShowListener.onShow();
  }
}

相关文章

ListView类方法