ScrollView
来源:互联网 发布:淘宝网车险 编辑:程序博客网 时间:2024/05/22 10:27
纵向 ScrollView
横向 HorizontalScrollView
<ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="none" > <TextView android:textSize="30sp" android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </ScrollView>
判断ScrollView到底部
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); text = (TextView)findViewById(R.id.text);// text.setText(getResources().getString(R.string.hello_world)); text.setText(R.string.hello_world); scrollView = (ScrollView)findViewById(R.id.scroll); scrollView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()){ case MotionEvent.ACTION_MOVE: //滑动到底部 if(scrollView.getChildAt(0).getMeasuredHeight() <= scrollView.getHeight() + scrollView.getScrollY()){ text.append("aaaaaaaaaaaaaaaaaaaa"); } break; } return false; } }); }
其他 设置scrollView x y 轴 scrollTo
递增递减 x y 轴 scrollBy
0 0
- ScrollView
- ScrollView
- scrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- ScrollView
- scrollView
- ScrollView
- ScrollView
- scrollview
- ScrollView
- ScrollView
- scrollView
- ScrollView
- ArcEngine开发_导出地图
- jQuery Pagination Plugin
- GitHub上最火的40个Android开源项目(一)
- 配置Snappy压缩
- MySQL的InnoDB和MyISAM区别
- ScrollView
- 二叉树(静态)(遍历)
- 解决cell重用
- 微信开放平台 公众号第三方平台开发 教程三 一键登录授权给第三方平台
- Nginx+tomcat+memcached负载均衡集群中共享session的方法
- webview js alert出不来的问题
- vim 打造 C/C++ IDE
- Oracle常用知识小结
- jvm参数调优