当前位置:网站首页>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();
}
});
}
}
边栏推荐
- How to implement safety practice in software development stage
- mysql使用笔记一
- [Fantan] how to design a test platform?
- viewflipper的功能和用法
- 【网络攻防原理与技术】第5章:拒绝服务攻击
- 【可信计算】第十三次课:TPM扩展授权与密钥管理
- Share the latest high-frequency Android interview questions, and take you to explore the Android event distribution mechanism
- LeetCode 890(C#)
- 状态模式 - Unity(有限状态机)
- Several best practices for managing VDI
猜你喜欢

百度地图自定义样式向右拖拽导致全球地图经度0度无法正常显示

【网络攻防原理与技术】第5章:拒绝服务攻击

99%的人都不知道|私有化部署还永久免费的即时通讯软件!

【分布式理论】(二)分布式存储

【网络攻防原理与技术】第6章:特洛伊木马

策略模式 - Unity

【TPM2.0原理及应用指南】 5、7、8章
Share the latest high-frequency Android interview questions, and take you to explore the Android event distribution mechanism

麒麟信安加入宁夏商用密码协会

麒麟信安携异构融合云金融信创解决方案亮相第十五届湖南地区金融科技交流会
随机推荐
How to mount the original data disk without damage after the reinstallation of proxmox ve?
Several best practices for managing VDI
Solidity 开发环境搭建
textSwitch文本切换器的功能和用法
Sator launched Web3 game "satorspace" and launched hoobi
L1-027 出租(Lua)
What is cloud computing?
使用 xml资源文件定义菜单
【饭谈】Web3.0到来后,测试人员该何去何从?(十条预言和建议)
Functions and usage of viewflipper
serachview的功能和用法
Establishment of solid development environment
LeetCode刷题day49
On Apache Doris Fe processing query SQL source code analysis
Siggraph 2022 best technical paper award comes out! Chen Baoquan team of Peking University was nominated for honorary nomination
Flash build API Service - generate API documents
Biped robot controlled by Arduino
【TPM2.0原理及应用指南】 16、17、18章
网络攻防复习篇
本周小贴士#136:无序容器