0
(內部列表getView
) 我動態地創建StateListDrawable
和setBackgroundDrawable()
使用它:如何使用setBackgroundDrawable和setBackground?
convertView.setBackgroundDrawable(stateListDrawable);
但這depricated!如果我用這個。
convertView.setBackground(stateListDrawable);
我的應用程序崩潰(convertView是RelativeLayout的)也爲convertView.setBackgroundResource
死機一樣你能告訴我,我應該用什麼呢?
崩潰是由拋出的Throwable造成的,但它是什麼Throwable,你只知道,因爲你沒有發佈跟蹤轉儲 – pskink 2014-10-09 19:57:54