博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android ScrollViewy与HorizontalScrollView实现上下左右滚动
阅读量:2383 次
发布时间:2019-05-10

本文共 732 字,大约阅读时间需要 2 分钟。

  1. <ScrollView  
  2.             android:layout_width="fill_parent"  
  3.             android:layout_height="wrap_content"  
  4.             android:layout_alignParentBottom="true"  
  5.             android:layout_alignParentTop="true"  
  6.             android:layout_marginBottom="50dp"  
  7.             android:scrollbars="none"  
  8.             >  
  9.   
  10.             <HorizontalScrollView  
  11.                 android:layout_width="fill_parent"  
  12.                 android:layout_height="fill_parent"  
  13.                 android:orientation="horizontal"  
  14.                 android:layout_gravity="center_horizontal" >  
  15.   
  16.                 <LinearLayout  
  17.                     android:id="@+id/allnum"  
  18.                     android:layout_width="fill_parent"  
  19.                     android:layout_height="wrap_content"  
  20.                     android:gravity="center"  
  21.                     android:layout_gravity="center"  
  22.                     android:orientation="vertical" >  
  23.                 </LinearLayout>  
  24.             </HorizontalScrollView>  
  25.         </ScrollView>  

 

Tip:

android:scrollbars="none"  和  setVerticalScrollBarEnabled(true);   滚动条隐藏,活动的时候也隐藏

转载地址:http://iluab.baihongyu.com/

你可能感兴趣的文章
sar的用法
查看>>
Cocos2dx3.2从零开始【四】继续。
查看>>
Unable to execute dex: Multiple dex files define 解决方法
查看>>
Cocos2dx3.2从零开始【五】
查看>>
佛祖保佑 永无BUG 永不修改
查看>>
字符画
查看>>
JS读取DropDownList中的值
查看>>
进度条例子
查看>>
WordPress注册支持中文用户名的解决办法
查看>>
设置WordPress评论头像为圆角鼠标触碰后旋转效果
查看>>
WordPress:删除多说插件的版权信息
查看>>
查询表中两个条件下的数目,按三列组成表
查看>>
WinForm下禁止TextBox右键菜单
查看>>
C#_winform_DataGridView_的18种常见属性
查看>>
C# 扩展系统类string的方法
查看>>
webBrowser强制在本窗口打开,禁止在新窗口打开
查看>>
C#获取CPU序列号代码、硬盘ID、网卡硬件地址等类文件
查看>>
Html常用符号
查看>>
WinForm控制Webbrowser自动登录
查看>>
access表(.mdb文件) 导入 power designer
查看>>