我正在尝试为我的原生脚本应用程序创建一周日历视图。问题出在android的样式上。星期名称的顶部和底部没有足够的间距。
我尝试过以编程方式增加高度,但没有任何影响。
const weekViewStyle = new CalendarWeekViewStyle();
const dayNameCellStyle = new CellStyle();
dayNameCellStyle.cellAlignment = CalendarCellAlignment.HorizontalCenter;
dayNameCellStyle.cellTextSize = 14;
dayNameCellStyle.effectiveHeight = 30;
dayNameCellStyle.effectiveMarginBottom = 20;
weekViewStyle.dayNameCellStyle = dayNameCellStyle;发布于 2019-06-23 21:23:07
我不认为更改高度的选项在插件中是公开的,但您可以使用loaded中的本机方法调用来实现。
onLoaded(event) {
const calendar = event.object;
if (calendar.android) {
calendar.android.setDayNamesHeight(layout.toDevicePixels(40));
} else {
calendar.ios.presenter.style.dayNameCellHeight = 40;
}
}https://stackoverflow.com/questions/56720589
复制相似问题