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.
ListView 用のアダプターがあり、すべてがメイン アクティビティで正常に動作します。リストビューは、各アプリの横にチェックボックスがあるすべてのアプリのリストです。現在、アプリを実行すると、いくつかのチェックボックスがランダムにチェックされます。起動時にチェックするボックスとチェックしないボックスをどこで定義しますか? それはメインアクティビティにありますか、それともアダプタにありますか?
where do I define which boxes are or are not checked upon startup? Is it in the main activity or in the Adapter?
私の知る限り、アダプターで定義できます。方法を確認するには、次のチュートリアルを確認してください。
Android ListView チェックボックスの例
お役に立てれば。