android ScrollView自动滑到顶部
2015-11-13 11:10
381 查看
scrollview 自动定位到顶部
利用获取焦点的方式定位到最顶部的组件或layout
rl_layout = (RelativeLayout) rootView.findViewById(R.id.rl_layout);// scrollview的子组件
rl_layout.setFocusable(true);
rl_layout.setFocusableInTouchMode(true);
rl_layout.requestFocus();
scrollview自动定位到顶部
利用获取焦点的方式定位到最顶部的组件或layout
rl_layout = (RelativeLayout) rootView.findViewById(R.id.rl_layout);// scrollview的子组件
rl_layout.setFocusable(true);
rl_layout.setFocusableInTouchMode(true);
rl_layout.requestFocus();
scrollview自动定位到顶部
相关文章推荐
- Android之计算缓存大小并且清空缓存
- 《Android开发技术周报》笔记
- Android文本样式(一)
- Android——ButterKnife--View注入框架
- 使用TextView实现跑马灯效果
- androidStudio 中jar包制作
- jenkins gradle android
- SwipeRefreshLayout简单使用
- Android学习之动画
- Android解决ViewPager嵌套Fragment,Fragment嵌套ViewPager滑动冲突
- 分分钟学习编写高效的 Android 代码
- Android studio 中 Project Structure 的使用
- 【Android】RecyclerView卡顿问题jerky
- Android安全专项测试之反编译
- Android之计算缓存大小并且清空缓存
- Android Studio常用快捷键-mac版
- android自定义CheckBox和RadioButton中文字和图片之间距离问题解决
- 深入Android开发之--理解View#onTouchEvent
- Android 中Canvas.drawBitmap()的使用
- android刮刮乐