import android.graphics.Color;
import android.util.TypedValue;

import androidx.annotation.ColorInt;

public class MyClass {
    @ColorInt
    private int eventTextColor = Color.BLACK;

    private int eventPadding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 4f, getResources().getDisplayMetrics());

    @ColorInt
    private int defaultEventColor = 0;

    @ColorInt
    private int newEventColor = 0;

    private int dayNameLength = MyClass.LENGTH_LONG;

    private float overlappingEventGap = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1f, getResources().getDisplayMetrics());

    private float weekDayHeaderRowPaddingTop = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 6f, getResources().getDisplayMetrics());

    private float weekDayHeaderRowPaddingBottom = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 6f, getResources().getDisplayMetrics());

    private float spaceBetweenWeekDaysAndAllDayEvents = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3f, getResources().getDisplayMetrics());

    private float spaceBelowAllDayEvents = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 3f, getResources().getDisplayMetrics());

    private int spaceBetweenHeaderWeekDayTitleAndSubtitle = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 6f, getContext().getResources().getDisplayMetrics());

    private boolean isShowDistinctWeekendColor = false;

    private boolean isShowDistinctPastFutureColor = false;

    private boolean isShowNowLine = false;

    @ColorInt
    private int nowLineColor = Color.rgb(102, 102, 102);

    private int nowLineThickness = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2f, getResources().getDisplayMetrics());
    
    // Getters and Setters
}
convert sixth part of kotlin class to java code below from previous codeColorInt var eventTextColor Int = ColorBLACK setvalue if field == value return f

原文地址: https://www.cveoy.top/t/topic/jd0p 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录