我是靠谱客的博主 优美枫叶,这篇文章主要介绍android自定义view内容显示不全,现在分享给大家,希望可以做个参考。

当自定义view中内容过多,导致页面内容无法完全显示时,自己首先考虑到了怎么加入下拉条使用户可以下拉查看余下内容,这样做不知道会增加多少工作量,可能页面大小等需要重新计算,页面中元素各个位置也可能需要重新计算。

后来查到可以使用SCROLLVIEW来自动夸大显示区域。


解决方法是:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fillViewport="true" >


    <my.topoStructureView
        android:id="@+id/topoStructureView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />


</ScrollView>



最后

以上就是优美枫叶最近收集整理的关于android自定义view内容显示不全的全部内容,更多相关android自定义view内容显示不全内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(89)

评论列表共有 0 条评论

立即
投稿
返回
顶部