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

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

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

ListView.setHorizontalScrollBarEnabled介绍

暂无

代码示例

代码示例来源:origin: arcadefire/nice-spinner

listView.setItemsCanFocus(true);
listView.setVerticalScrollBarEnabled(false);
listView.setHorizontalScrollBarEnabled(false);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

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

ListView listView = getListView();
listView.setVerticalScrollBarEnabled(false);
listView.setHorizontalScrollBarEnabled(false);

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

public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  View view = inflater.inflate(android.R.layout.list_content, container, false);
  ListView listView = (ListView) view.findViewById(android.R.id.list);
  listView.setScrollBarSize(0);
  listView.setScrollbarFadingEnabled(true);
  listView.setHorizontalScrollBarEnabled(false);
  listView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
  listView.setVerticalScrollBarEnabled(false);
  listView.setHorizontalScrollBarEnabled(false);
  return view;
}

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

@OnClick({R.id.stv_activityAnimationSetting})
public void onViewClicked(View v) {
  switch (v.getId()) {
    case R.id.stv_activityAnimationSetting:
      if (alertDialog == null) {
        alertDialog = new AlertDialog.Builder(mContext)
            .setSingleChoiceItems(R.array.arrays_animation, animationIndex, new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) {
                chooseIndex = which;
              }
            })
            .setTitle("选择Adapter条目加载动画")
            .setPositiveButton(R.string.ensure, new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) {
                SPUtil.put(mContext, SPConstant.SP_KEY_ACTIVITY_ANIMATION_INDEX, chooseIndex);
                animationIndex = (int) SPUtil.get(mContext, SPConstant.SP_KEY_ACTIVITY_ANIMATION_INDEX, animationIndex);
                stvActivityAnimation.setLeftBottomString(listAnimation.get(animationIndex));
                EventBus.getDefault().post(animationIndex, EventConstant.EVENT_KEY_CHANGE_ADAPTER_ANIMATION);
              }
            })
            .create();
      }
      alertDialog.getListView().setVerticalScrollBarEnabled(false);
      alertDialog.getListView().setHorizontalScrollBarEnabled(false);
      alertDialog.show();
      break;
  }
}

代码示例来源:origin: towavephone/MemoryCleaner

@Override public void initPreferenceListView(View view) {
  ListView listView = (ListView) view.findViewById(android.R.id.list);
  listView.setHorizontalScrollBarEnabled(false);
  listView.setVerticalScrollBarEnabled(false);
  listView.setDivider(
      new ColorDrawable(getResources().getColor(R.color.grey)));
  listView.setDividerHeight((int) getResources().getDimension(
      R.dimen.preference_divider_height));
  listView.setFooterDividersEnabled(false);
  listView.setHeaderDividersEnabled(false);
}

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

@Override
  public void onClick(View v) {
    if (alertDialog == null) {
      alertDialog = new AlertDialog.Builder(mContext)
          .setTitle("选择banner切换动画")
          .setSingleChoiceItems(R.array.arrays_transition, transitionIndex, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
              chooseIndex = which;
            }
          })
          .setPositiveButton(R.string.ensure, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
              SPUtil.put(mContext, SPConstant.SP_KEY_HOME_TRANSITION_INDEX, chooseIndex);
              transitionIndex = (int) SPUtil.get(mContext, SPConstant.SP_KEY_HOME_TRANSITION_INDEX, transitionIndex);
              if (banner != null) {
                banner.setTransitionEffect(listTransitionEffect.get(transitionIndex));
              }
            }
          })
          .create();
      alertDialog.getListView().setVerticalScrollBarEnabled(false);
      alertDialog.getListView().setHorizontalScrollBarEnabled(false);
    }
    alertDialog.show();
  }
})

代码示例来源:origin: chengzichen/KrGallery

AndroidUtilities.dp(4));
listView.setClipToPadding(false);
listView.setHorizontalScrollBarEnabled(false);
listView.setVerticalScrollBarEnabled(false);
listView.setSelector(new ColorDrawable(0));

代码示例来源:origin: yaozs/YzsLib

listView.setHorizontalScrollBarEnabled(false);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

相关文章

ListView类方法