当前位置:网站首页>Function and usage of calendar view component
Function and usage of calendar view component
2022-07-07 17:36:00 【XLMN】
calendarview Function and usage of calendar view component
calendarview Can be used to display and select dates . Users can choose the date , Or scroll the calendar by touching , Can also pass setondatechangelistener() Release method to monitor the date change
<?xml version="1.0" encoding="utf-8"?>
Set weekly style line color
public class MainActivity extends Activity {
CalendarView cv;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.calendarview);
cv=findViewById(R.id.calendarview);
// by calendarview Add event listener
cv.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {
@Override
public void onSelectedDayChange(@NonNull CalendarView view, int year, int month, int dayOfMonth) {
// Use total Displays the date selected by the user
Toast.makeText(MainActivity.this," Do you believe a word , Those who are ready will get a candy "+year+" year "+(month+1)+" month "+dayOfMonth+" Japan , come on. , The world is uncertain , You are the dark horse ",Toast.LENGTH_LONG).show();
}
});
}
}
边栏推荐
- 如何在软件研发阶段落地安全实践
- 第二十四届中国科协湖南组委会调研课题组一行莅临麒麟信安调研考察
- 使用 xml资源文件定义菜单
- 99%的人都不知道|私有化部署还永久免费的即时通讯软件!
- Nerf: the ultimate replacement for deepfake?
- 字符串 - string(Lua)
- mysql官网下载:Linux的mysql8.x版本(图文详解)
- 企业即时通讯软件是什么?它有哪些优势呢?
- [fan Tan] after the arrival of Web3.0, where should testers go? (ten predictions and suggestions)
- rpcms获取指定分类下的文章的方法
猜你喜欢
自定义View必备知识,Android研发岗必问30+道高级面试题
Lex & yacc of Pisa proxy SQL parsing
textSwitch文本切换器的功能和用法
第3章业务功能开发(用户访问项目)
How to choose the appropriate automated testing tools?
麒麟信安携异构融合云金融信创解决方案亮相第十五届湖南地区金融科技交流会
【TPM2.0原理及应用指南】 9、10、11章
Biped robot controlled by Arduino
alertDialog創建对话框
Sator launched Web3 game "satorspace" and launched hoobi
随机推荐
大笨钟(Lua)
Show progress bar above window
L1-028 判断素数(Lua)
【TPM2.0原理及应用指南】 5、7、8章
第3章业务功能开发(用户访问项目)
百度地图自定义样式向右拖拽导致全球地图经度0度无法正常显示
How to choose the appropriate automated testing tools?
How to implement safety practice in software development stage
第1章CRM核心业务介绍
VSCode关于C语言的3个配置文件
Several best practices for managing VDI
calendarview日历视图组件的功能和用法
Problems encountered in Jenkins' release of H5 developed by uniapp
Functions and usage of imageswitch
【TPM2.0原理及应用指南】 9、10、11章
命令模式 - Unity
Sator launched Web3 game "satorspace" and launched hoobi
Functions and usage of viewswitch
DatePickerDialog和trimepickerDialog
本周小贴士#134:make_unique与私有构造函数