android.widget.HorizontalScrollView.setSmoothScrollingEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(153)

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

HorizontalScrollView.setSmoothScrollingEnabled介绍

暂无

代码示例

代码示例来源:origin: Tencent/RapidView

public void run(RapidParserObject object, Object view, Var value) {
    ((HorizontalScrollView)view).setSmoothScrollingEnabled(value.getBoolean());
  }
}

代码示例来源: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: laizimo/richeditor

if (count > MAX_NUM_ONE_ROW) {
  HorizontalScrollView scrollView = new HorizontalScrollView(getContext());
  scrollView.setSmoothScrollingEnabled(true);
  scrollView.setHorizontalScrollBarEnabled(false);
  menu.addView(scrollView, new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

代码示例来源: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);
}

相关文章

HorizontalScrollView类方法