首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在RadCalendar中增加dayNameCells的高度

在RadCalendar中增加dayNameCells的高度
EN

Stack Overflow用户
提问于 2019-06-23 10:28:42
回答 1查看 701关注 0票数 0

我正在尝试为我的原生脚本应用程序创建一周日历视图。问题出在android的样式上。星期名称的顶部和底部没有足够的间距。

我尝试过以编程方式增加高度,但没有任何影响。

代码语言:javascript
运行
复制
        const weekViewStyle = new CalendarWeekViewStyle();
        const dayNameCellStyle = new CellStyle();
        dayNameCellStyle.cellAlignment = CalendarCellAlignment.HorizontalCenter;
        dayNameCellStyle.cellTextSize = 14;
        dayNameCellStyle.effectiveHeight = 30;
        dayNameCellStyle.effectiveMarginBottom = 20;
        weekViewStyle.dayNameCellStyle = dayNameCellStyle;

here's the link to the playground

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-06-23 21:23:07

我不认为更改高度的选项在插件中是公开的,但您可以使用loaded中的本机方法调用来实现。

代码语言:javascript
运行
复制
onLoaded(event) {
    const calendar = event.object;
    if (calendar.android) {
        calendar.android.setDayNamesHeight(layout.toDevicePixels(40));
    } else {
        calendar.ios.presenter.style.dayNameCellHeight = 40;
    }
}

Updated Playground

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56720589

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档