原因是在创建Item时将layout_height属性设成了match_parent,致使一个Item充满了一页屏幕,只要将此属性改为wrap_parent就可以了。

<LinearLayout xmlns:
    andro
    android:orientation="horizontal" 
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <ImageView
        android:
        android:layout_width="80dp"
        android:layout_height="80dp" />
    <TextView
        android:
        android:layout_width="match_parent"
        android:layout_height="80dp"
        android:gravity="center"/>
</LinearLayout>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-01-10
  • 2022-12-23
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案