阅读703 返回首页    go 阿里云 go 技术社区[云栖]


LinearLayout 垂直滚动

activity中经常只是一个LinearLayout,但这样的话,如果activity内容超过一屏,无法滚动查看下面的内容。

这时只需在外面嵌套一个ScrollView就可以了,

    <?xml version="1.0" encoding="utf-8"?>  
    <ScrollView  
        xmlns:andro  
        android:layout_width="fill_parent"  
        android:layout_height="fill_parent"  
        android:scrollbars="vertical"  
        android:fadingEdge="vertical">  
        <LinearLayout  
            android:layout_width="fill_parent"  
            android:layout_height="fill_parent"  
            android:orientation="vertical"  
            android:scrollbarStyle="outsideInset"  
            android:scrollbars="vertical">  
        </LinearLayout>  
    </ScrollView>  

遇到的一个bug parsing XML: unbound prefix:https://trinea.iteye.com/blog/1084706

 

参考:

https://bywuyu.blog.163.com/blog/static/1687376682010101064641190/LinearLayout 垂直滚动


最后更新:2017-04-03 14:54:38

  上一篇:go Android Dialog 全屏
  下一篇:go RGMII,MII,GMI接口