本文整理了Java中android.widget.HorizontalScrollView.setHorizontalScrollBarEnabled()
方法的一些代码示例,展示了HorizontalScrollView.setHorizontalScrollBarEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HorizontalScrollView.setHorizontalScrollBarEnabled()
方法的具体详情如下:
包路径:android.widget.HorizontalScrollView
类名称:HorizontalScrollView
方法名:setHorizontalScrollBarEnabled
暂无
代码示例来源: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: wanliyang1990/NavigationBar
public NavitationScrollLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
margleft = dip2px(context, 0);
titleLayout = new LinearLayout(context);
LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
titleLayout.setLayoutParams(layoutParams);
titleLayout.setOrientation(LinearLayout.HORIZONTAL);
titleLayout.setGravity(Gravity.CENTER_VERTICAL);
LayoutParams layoutParams2 = new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
horizontalScrollView = new HorizontalScrollView(context);
horizontalScrollView.addView(titleLayout, layoutParams2);
horizontalScrollView.setHorizontalScrollBarEnabled(false);
addView(horizontalScrollView);
}
代码示例来源:origin: KCrason/DynamicPagerIndicator
public void setViewPager(ViewPager viewPager) {
if (viewPager == null || viewPager.getAdapter() == null) {
throw new RuntimeException("viewpager or pager adapter is null");
}
this.mViewPager = viewPager;
viewPager.addOnPageChangeListener(this);
updateIndicator();
if (mPagerIndicatorMode == INDICATOR_MODE_SCROLLABLE) {
LinearLayout linearLayout = new LinearLayout(mContext);
LinearLayout.LayoutParams linearLayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
linearLayout.setLayoutParams(linearLayoutParams);
linearLayout.setOrientation(VERTICAL);
linearLayout.addView(mTabParentView);
linearLayout.addView(addScrollableLine());
mAutoScrollHorizontalScrollView = new HorizontalScrollView(mContext);
LinearLayout.LayoutParams scrollLayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
mAutoScrollHorizontalScrollView.setLayoutParams(scrollLayoutParams);
mAutoScrollHorizontalScrollView.setHorizontalScrollBarEnabled(false);
mAutoScrollHorizontalScrollView.addView(linearLayout);
addView(mAutoScrollHorizontalScrollView);
} else {
addView(mTabParentView);
addView(addScrollableLine());
}
}
代码示例来源:origin: fengmaolian/LoginAndShare
sv.setHorizontalScrollBarEnabled(false);
sv.setHorizontalFadingEdgeEnabled(false);
LayoutParams lpSv = new LayoutParams(
代码示例来源:origin: WiInputMethod/VE
public void create(int direction, Context context) {
super.create(context);
outerLayoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
innerLayoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
layoutforWrapButtons = new LinearLayout(context);
res = context.getResources();
this.direction = direction;
if (direction == horizontal) {
horizontalScrollView = new HorizontalScrollView(context);
horizontalScrollView.setSmoothScrollingEnabled(true);//很必须,勿删
horizontalScrollView.setHorizontalScrollBarEnabled(false);
layoutforWrapButtons.setOrientation(LinearLayout.HORIZONTAL);
horizontalScrollView.addView(layoutforWrapButtons, innerLayoutParams);
} else if (direction == vertical) {
scrollView = new ScrollView(context);
scrollView.setSmoothScrollingEnabled(true);
scrollView.setScrollbarFadingEnabled(false);
layoutforWrapButtons.setOrientation(LinearLayout.VERTICAL);
scrollView.addView(layoutforWrapButtons, innerLayoutParams);
}
}
代码示例来源:origin: 296777513/pedometer
sv.setHorizontalScrollBarEnabled(false);
sv.setHorizontalFadingEdgeEnabled(false);
LinearLayout.LayoutParams lpSv = new LinearLayout.LayoutParams(
代码示例来源:origin: laizimo/richeditor
HorizontalScrollView scrollView = new HorizontalScrollView(getContext());
scrollView.setSmoothScrollingEnabled(true);
scrollView.setHorizontalScrollBarEnabled(false);
menu.addView(scrollView, new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
LinearLayout linearLayout = new LinearLayout(getContext());
代码示例来源:origin: WiInputMethod/VE
/**
*
*/
public void create(Context context) {
super.create(horizontal, context);
symbols = new QuickSymbolsDataStruct();
skinInfoManager = SkinInfoManager.getSkinInfoManagerInstance();
try {
symbols = loadSymbolFromFile("default");
} catch (Exception e) {
symbols = loadSymbolsFromXML();
try {
writeSymbolsToFile("default", symbols);
} catch (IOException e1) {
e1.printStackTrace();
}
}
String[] temp = res.getStringArray(R.array.LOCK_SYM);
mLockSymbol = temp[1];
mUnLockSymbol = temp[0];
addFirstButton();
addLastButton();
updateCurrentSymbolsAndSetTheContent(currentSymbolFlag);
horizontalScrollView.setSmoothScrollingEnabled(true);
horizontalScrollView.setHorizontalScrollBarEnabled(false);
}
代码示例来源:origin: stackoverflow.com
hori.setHorizontalScrollBarEnabled(false);
hori2=(HorizontalScrollView)findViewById(R.id.hr_2);
内容来源于网络,如有侵权,请联系作者删除!