1
我正在嘗試設置與ColorDrawable
界讓backgroundDrawable到View
,它只是不能正常工作,使用下面的代碼:ColorDrawable不會在其邊界畫
ColorDrawable d = new ColorDrawable(getContext().getResources()
.getColor(R.color.red));
d.setBounds(0, 0, 20, 20);
convertView.setBackgroundDrawable(d);
結果是convertView背景得到填補這裏有紅色。
謝謝。
你的要求究竟是什麼? –