1. 程式人生 > >android系統自帶的適配佈局activity_list_item

android系統自帶的適配佈局activity_list_item

理想:註冊頁面,資訊填寫後,跳轉到另外一個activity

結果:一點註冊,app就閃退

日誌顯示:java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView

   Caused by: java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.TextView
                at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:379)

程式碼片段:

    

推薦看下:http://blog.csdn.net/yangzhaomuma/article/details/49877311

   http://www.cnblogs.com/topcoderliu/archive/2011/05/07/2039862.html