MonthView
Android下用于自定义的月历视图控件
Install / Use
/learn @zcweng/MonthViewREADME
MonthView
用于Android开发中自定义的月历视图控件,使用简单,可以很方便自定义各种漂亮的风格。 适配器模式设计,性能优良。
Todo
添加无限滚动
Sample
<img src="https://github.com/zcweng/MonthView/blob/master/MonthView/device-2014-11-15-004408.png" width="300" height="500"/>Usage
XML中布局:
<com.zcw.widget.MonthView
android:id="@+id/monthView1"
android:padding="20dp"
android:background="@drawable/dialog_full_holo_light"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</com.zcw.widget.MonthView>
java代码:
monthView.setAdapter(new MonthAdapter() {
@Override
public View createCellView(ViewGroup viewGroup, int position) {
TextView textView = new TextView(getContext());
textView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
textView.setGravity(Gravity.CENTER);
return textView;
}
@Override
public void bindCellView(ViewGroup viewGroup, View child, int position, Calendar calendar) {
TextView textView = (TextView) child;
textView.setText(""+calendar.get(Calendar.DAY_OF_MONTH));
}
});
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
