Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Androidアプリケーションを開発しているときに、このListViewのアダプターを設定した後、ListViewのアイテムの背景を変更したいのですが、どうすればよいですか?ありがとうございました
私があなたの質問を正しく理解していれば、次の例を試してリストアイテムの背景を変更することができます... getView(int position, View convertView, ViewGroup parent) この方法でアダプタのメソッドをオーバーライドする必要があります: ... convertView.setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.mybackground)); ...
getView(int position, View convertView, ViewGroup parent)
convertView.setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.mybackground));