2017-05-28 22 views
0

RecyclerViewを作成します。各RecyclerViewアイテムには5つの日付があり、各日付にはその日に通知するかどうかのチェックボックスが必要です。複数のCheckBoxがあるAndroid RecyclerViewアイテム

モデルクラスは、日付ごとに5つのブール値で構成する必要がありますか?またはこれを達成するためのよりよい方法がありますか?

例:

private Date date1, date2, date3, date4, date5; 

private boolean notifyUserDate1, notifyUserDate2, notifyUserDate3, notifyUserDate4, notifyUserDate5; 

答えて

0

私はそれがこのようDateクラスを拡張した方が良いと思う。そして、

class NotifiableDate extends Date { 
    boolean notifyUser; 
    ... 

} 

とは、あなたのモデルクラスで5 NotifiableDate秒を置きます。

関連する問題