CalendarView.java 文件源码

java
阅读 51 收藏 0 点赞 0 评论 0

项目:android_ui 作者:
/**
 * Invoked from {@link #onBindViewHolder(ViewHolder, int)} with the given <var>dateInMillis</var>
 * that is associated with the {@link MonthView} at the <var>position</var> according to the
 * current data set size.
 *
 * @param holder       View holder to bind.
 * @param position     The position for which to perform binding.
 * @param dateInMillis Date in milliseconds obtained for the month position via
 *                     {@link CalendarDataSet#getMonthDate(int)}.
 */
@SuppressWarnings("ResourceType")
protected void onBindViewHolder(@NonNull ViewHolder holder, int position, long dateInMillis) {
    final MonthView monthView = (MonthView) holder.itemView;
    monthView.setLocale(locale);
    monthView.setDate(dateInMillis);
    if (selectedDayMonthPosition == position && selectedDay != NO_VALUE) {
        monthView.setSelection(selectedDay);
    } else {
        monthView.setSelection(0);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号