當前位置:吉日网官网 - 盛世收藏 - 同樣的Android的ListView+SimpleAdapter可以在Activity中顯示但不能在fragment中顯示。

同樣的Android的ListView+SimpleAdapter可以在Activity中顯示但不能在fragment中顯示。

妳的xml有問題...……TextView的高度是match_parent。怎麽會有ListView的空間?

& lt?xml?version="1.0 "?編碼="utf-8 "?& gt

& ltLinearLayout?xmlns:Android = "/apk/RES/Android "

Android:layout _ width = " match _ parent "

Android:layout _ height = " match _ parent "

android:orientation="vertical "?& gt

& lt文本視圖

Android:layout _ width = " match _ parent "

Android:layout _ height = " wrap _ content "

Android:text= "下面應該有列表"/& gt;

& lt列表視圖

Android:id = " @+id/myinfo _ main list "

Android:layout _ width = " match _ parent "

android:layout_height="0dp "

Android:layout _ weight = " 1 "/& gt;

& lt/linear layout & gt;

  • 上一篇:如何刪除發給快手的視頻
  • 下一篇:向日葵鮮花怎麽養時間比較久向日葵延長保存期的幾個小技巧
  • copyright 2024吉日网官网