开发者社区 问答 正文

关于listview的用法求教

可以在一个页面中有textview又可以有imageview和listview上下排列?是正常的写还是不行??

展开
收起
爵霸 2016-03-10 10:11:50 1649 分享 版权
1 条回答
写回答
取消 提交回答
  • <?xml version="1.0" encoding="utf-8"?>
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:scrollbars="none">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
    
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    
    
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    
    
        <!-- 这里用自定义的 -->
        <ListView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>
    
    </LinearLayout>
    
    
    2019-07-17 18:56:58
    赞同 展开评论
问答地址: