レストランの予約をするためにフォームを作成する必要があります
予約日を選択するには、CalendarViewを使用するのが最適だと考えました。しかし、すべてのレストランが週中営業しているわけではありません。ただし、特定の日付のみを無効にします。
CalendarViewに似た多くのライブラリを試したので、レストランが閉まっている日に該当する特定の日を動的にブロックできます。
そう
月曜日、火曜日などの日を無効にできるカレンダービューが必要です...
この英語のGoogle翻訳については申し訳ありません。本当に申し訳ありません
回答:
回答№1は0i have faced the same problem using custom calendar ,
i just overridden the function of adapter
@Override
public boolean isEnabled(int position) {
if(mySet.contains(position))
return true;
else
return false;
}
then i call the function int the adapter view
isEnabled(position);
befoer that tale Hashset and add the position which is displaying the calanderview
// mysetSize=set.size();
//isEnabled(Integer.parseInt(gridvalue));
Log.d(dayView.getTag()+"------1-------"+gridvalue,"-------"+position);
} else if ((Integer.parseInt(gridvalue) < 7) && (position > 28)) {
dayView.setTextColor(Color.WHITE);
dayView.setClickable(false);
dayView.setFocusable(false);
Log.d("-------mySet------","-------"+mySet);
Log.d(mysetSize+"-------28------"+gridvalue,"-------"+position);
set.add(position);
} else {
// setting curent month"s days in blue color.
dayView.setTextColor(Color.DKGRAY);
Log.d(dayView.getTag()+"-------current display post------","-------"+position);
mySet.add(position);
}
回答№2の場合は0
このライブラリを使う ZCustomCalendar
。必要な数の曜日(無効、忙しい、休日)を設定できます。