View控件居中

来源:互联网 发布:fc2最新手机视频域名 编辑:程序博客网 时间:2024/06/08 05:22
<span style="font-size:24px;">private void scrollCur(int index) {//得到要选中的tabView selectTab = mLl.getChildAt(index);(view)//要滑动到的位置int scrollToPostionX = selectTab.getLeft() + selectTab.getMeasuredWidth()/2 - mScreenWidth/2;//滑动操作                      X轴Y轴mHsv.smoothScrollTo(scrollToPostionX, 0);}</span>

0 0