android.widget.ScrollView.setVerticalScrollBarEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(102)

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

ScrollView.setVerticalScrollBarEnabled介绍

暂无

代码示例

代码示例来源:origin: Bearded-Hen/Android-Bootstrap

dropDownViewWidth = dropdownView.getMeasuredWidth();
scrollView.setVerticalScrollBarEnabled(false);
scrollView.setHorizontalScrollBarEnabled(false);
scrollView.addView(dropdownView);

代码示例来源:origin: ThinkBear/GrabRedPacket

public Widget_ScrollView(Context context, AttributeSet attrs) {
  super(context, attrs);
  super.setVerticalScrollBarEnabled(false);
}
@Override

代码示例来源:origin: flipkart-incubator/proteus

@Override
 public void setString(T view, String value) {
  if ("none".equals(value)) {
   view.setHorizontalScrollBarEnabled(false);
   view.setVerticalScrollBarEnabled(false);
  } else if ("horizontal".equals(value)) {
   view.setHorizontalScrollBarEnabled(true);
   view.setVerticalScrollBarEnabled(false);
  } else if ("vertical".equals(value)) {
   view.setHorizontalScrollBarEnabled(false);
   view.setVerticalScrollBarEnabled(true);
  } else {
   view.setHorizontalScrollBarEnabled(false);
   view.setVerticalScrollBarEnabled(false);
  }
 }
});

代码示例来源:origin: JustinRoom/JSCKit

@Nullable
  @Override
  public View createContentView(@NonNull Context context) {
    ScrollView scrollView = new ScrollView(context);
    scrollView.setVerticalScrollBarEnabled(false);
    //
    TextView textView = new TextView(context);
    textView.setText(R.string.article);
    scrollView.addView(textView, new ScrollView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
    return scrollView;
  }
}

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

private void createContainerView() {
  mLLayoutContainer = new LinearLayout(mContext);
  mLLayoutContainer.setId(R.id.lLayout_containerAlertDialog);
  mLLayoutContainer.setLayoutParams(new LinearLayout.LayoutParams(
      ViewGroup.LayoutParams.MATCH_PARENT, 0, 1.0f));
  mLLayoutContainer.setOrientation(LinearLayout.VERTICAL);
  mLLayoutContainer.setPadding(mPadding, dp2px(12), mPadding, dp2px(12));
  mLLayoutContainer.setGravity(mCenterGravity);
  mLLayoutRoot.addView(mLLayoutContainer);
  mLLayoutView = new LinearLayout(mContext);
  mLLayoutContainer.setId(R.id.lLayout_ViewAlertDialog);
  mLLayoutView.setOrientation(LinearLayout.VERTICAL);
  mLLayoutView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
  mSvView = new ScrollView(mContext);
  mSvView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
  mSvView.setOverScrollMode(View.OVER_SCROLL_NEVER);
  mSvView.setVerticalScrollBarEnabled(false);
  mSvView.addView(mLLayoutView);
  mLLayoutContainer.addView(mSvView);
  if (mListViews != null) {
    for (View v : mListViews) {
      mLLayoutView.addView(v);
    }
  }
}

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

public ActionBarPopupWindowLayout(Context context) {
  super(context);
  if (backgroundDrawable == null) {
    backgroundDrawable = getResources().getDrawable(R.drawable.popup_fixed);
  }
  setPadding(AndroidUtilities.dp(8), AndroidUtilities.dp(8), AndroidUtilities.dp(8), AndroidUtilities.dp(8));
  setWillNotDraw(false);
  try {
    scrollView = new ScrollView(context);
    scrollView.setVerticalScrollBarEnabled(false);
    addView(scrollView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
  } catch (Throwable e) {
    e.printStackTrace();
  }
  linearLayout = new LinearLayout(context);
  linearLayout.setOrientation(LinearLayout.VERTICAL);
  if (scrollView != null) {
    scrollView.addView(linearLayout, new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
  } else {
    addView(linearLayout, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
  }
}

代码示例来源:origin: Wilm0r/giggity

tentHeadersScr = new ScrollView(ctx);
tentHeadersScr.addView(tentHeaders);
tentHeadersScr.setVerticalScrollBarEnabled(false);
tentHeadersScr.setOnTouchListener(new OnTouchListener() {
  @Override

相关文章

ScrollView类方法