-3
我有一個列表視圖和自定義適配器....當我運行程序時,它會給我錯誤getview.How我可以解決這個錯誤。我在android中getView()錯誤?
代碼: -
public View getView(final int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
viewHolder = new ViewHolder();
convertView = View.inflate(m_Context, R.layout.deallisting_card_view, null);
viewHolder.m_Header = (TextView) convertView.findViewById(R.id.headingText);
viewHolder.m_Subheader = (TextView) convertView.findViewById(R.id.subHeaderText);
viewHolder.m_DummyText = (TextView) convertView.findViewById(R.id.subHeadingText);
viewHolder.m_logoImage = (ImageView) convertView.findViewById(R.id.appImage);
viewHolder.m_getBtn = (Button) convertView.findViewById(R.id.getDealBtn);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
}
在
covertview = View.inflate(m_Context...);
在此行中我得到錯誤
調用'convertView = inflater.inflate(R.layout.deallisting_card_view,NULL);' –
可以添加整個類 – DKV
在這裏發佈錯誤日誌 –