你好,游客 登录 注册 搜索
背景:
阅读新闻

Android开发:实现一个Activity存在水平和垂直滚动条

[日期:2011-12-15] 来源:Linux社区  作者:manymore13 [字体:大 中 小]
  1. <ScrollView xmlns:Android="http://schemas.android.com/apk/res/android"  
  2.         android:layout_width="match_parent"   
  3.         android:layout_height="match_parent"  
  4.         android:scrollbars="vertical" >    
  5.     <HorizontalScrollView  
  6.         android:layout_width="wrap_content"   
  7.         android:layout_height="wrap_content"  
  8.         >          
  9.     <LinearLayout   
  10.         android:orientation="vertical"  
  11.         android:layout_width="fill_parent"  
  12.         android:layout_height="fill_parent"  
  13.         >                      
  14.     </LinearLayout>  
  15.     </HorizontalScrollView>  
  16. </ScrollView>  

根标签是ScrollView下面的子标签是HorizontalScrollView,然后HorizontalScrollView下面就是你自己的布局了。

Ps:Scrollview和HorizontalScrollView标签下面都只能嵌入一个标签  

linux
相关资讯       Android开发教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款