This Analog Clock implementation, built using Jetpack Compose for Android, features an elegant and colorful design with smooth animations. The clock’s hour, minute, and second hands rotate gracefully, accompanied by a dynamic gradient background that adds vibrancy to the interface. A unique progress indicator bar tracks the clock’s movement, while bold markers enhance the time display for better readability. Additionally, the app provides a digital time display for easy access and understanding. The design is not only visually appealing but also user-friendly, with clear indicators for each clock hand, ensuring a seamless and intuitive experience.
- 🕰 Smooth Analog Clock Movement: Crafted using
Canvas
for seamless animation of hour, minute, and second hands. - 🎨 Colorful Analog Clock Animations: Enjoy dynamic gradient transitions as the clock hands rotate, each with its own indicator for precise tracking.
- ⏳ Real-Time Time Updates: Leveraging
LaunchedEffect
to ensure accurate, live clock updates. - 🕑 Digital Time Display: Easily readable digital format for users who prefer to view the time numerically.
- ⏱ Customizable Start Time: Set the clock to start from any chosen millisecond, offering flexibility in time tracking.
- 🌟 Intuitive UI Design: A clean and user-friendly interface, providing an exceptional and accessible user experience.
- 🏆 Optimized Performance: Smooth animations and high efficiency for a lag-free and responsive experience.
- Android API Level 24 or higher
- Kotlin 1.8 or later
- Jetpack Compose for building modern, UI-centric Android applications
@Preview(showBackground = true)
@Composable
fun ClockPreview() {
ClockTheme {
Box(
Modifier.fillMaxWidth().background(
color = Color(0xFF080B1F)
),
contentAlignment = Alignment.Center
) {
Clock(
state = rememberClockState(),
modifier = Modifier
.padding(24.dp)
.fillMaxWidth()
.height(320.dp)
)
}
}
}
Clone this repository:
git clone https://github.com/CoderBDK/Clock.git
This project is licensed under the MIT License. See the LICENSE file for details.