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

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

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

HorizontalScrollView.getChildCount介绍

暂无

代码示例

代码示例来源:origin: gdpancheng/LoonAndroid3

@Init
void init() {
  System.out.println(pull_refresh_horizontalscrollview.getChildCount());
}

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

List<Integer> centered_textViews = new ArrayList<Integer>();
 TextView text;
 HorizontalScrollView scrollView = findViewById(R.id.your_hsv);
 Rect scrollBounds = new Rect();
 scrollView.getHitRect(scrollBounds);
 for (int i = 0; i < scrollView.getChildCount(); i++) {
   text = (TextView) scrollView.getChildAt(i);
   if (text.getLocalVisibleRect(scrollBounds))
     centered_textViews.add(i);
 }
 int centered_textview_index = (int) (centered_textViews.size() / 2);
 TextView centered_text = (TextView) (scrollView
     .getChildAt(centered_textViews.get(centered_textview_index)));

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

.getChildCount() - 1);
int diff = (table.getRight() - (scroll.getWidth()
    + scroll.getScrollX() + table.getLeft()));

相关文章

HorizontalScrollView类方法