A custom iOS-style vertical calendar view with event marking support for Android
![]() |
![]() |
![]() |
---|---|---|
Month View | Day Selection | Event Marking |
- 🗓️ Vertical month scrolling calendar
- 🎯 Current day highlighting
- 🔴 Custom event markers
- 🎨 Theme customization options
- 📱 Android 5.0+ (API 21+) support
- 💯 100% Kotlin compatible
- 🛠️ Regular maintenance and updates
- Add JitPack repository in your root
settings.gradle
:
dependencyResolutionManagement {
repositories {
maven { url "https://jitpack.io" }
}
}
- Add dependency in your module's
build.gradle
:
dependencies {
implementation 'com.github.Zulqurnain:ZCalenderView:2.0'
}
<project>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.Zulqurnain</groupId>
<artifactId>ZCalenderView</artifactId>
<version>2.0</version>
</dependency>
</project>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<jutt.com.zcalenderview.ZCalenderView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:colorMonthName="@color/green"
app:colorCurrentDayCircle="@color/red"
app:calendarHeight="400dp"/>
</LinearLayout>
class MainActivity : AppCompatActivity(), DatePickerController {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val calendarView = findViewById<ZCalenderView>(R.id.calendar_view).apply {
setController(this@MainActivity)
setEventsHashMap(createEventMap())
}
calendarView.scrollToToday()
}
private fun createEventMap() = mapOf<SimpleMonthAdapter.CalendarDay,Int>(
SimpleMonthAdapter.CalendarDay(2024, Calendar.JANUARY, 15) to 1,
SimpleMonthAdapter.CalendarDay(2024, Calendar.FEBRUARY, 14) to 2
)
override fun onDayOfMonthSelected(year: Int, month: Int, day: Int) {
Toast.makeText(this, "Selected: ${day}/${month + 1}/$year", Toast.LENGTH_SHORT).show()
}
}
Attribute | Description | Default Value |
---|---|---|
app:colorMonthName |
Month text color | #000000 |
app:colorDayName |
Day header text color | #000000 |
app:colorCurrentDayCircle |
Current day highlight color | #FF0000 |
app:colorCurrentDayText |
Current day text color | #FFFFFF |
app:calendarHeight |
Initial calendar height | 400dp |
app:textSizeDay |
Day number text size | 14sp |
app:selectedDayRadius |
Selected day circle radius | 16dp |
We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
MIT License
Copyright (c) 2024 Zulqurnain
Permission is hereby granted...
**Key Fixes Applied:**
1. Added proper alt text for all images
2. Fixed code block formatting and syntax highlighting
3. Corrected XML namespace declarations
4. Added proper table formatting
5. Removed HTML tags in favor of pure Markdown
6. Added consistent emoji usage
7. Improved section organization
8. Added license section
9. Included contribution guidelines
**To Use:**
1. Copy entire content
2. Paste into your `README.md` file
3. Replace placeholder banner URL with actual image
4. Update license text if needed
5. Verify all links work correctly
The formatting is now compatible with Android Studio's Markdown parser and follows best practices for GitHub documentation.