An open API service indexing awesome lists of open source software.

https://github.com/coderbdk/clock

Analog Clock
https://github.com/coderbdk/clock

analog-clock android app clock compose jetpack jetpack-compose kotlin

Last synced: 10 months ago
JSON representation

Analog Clock

Awesome Lists containing this project

README

          

# 🕰 Analog Clock in Jetpack Compose
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.

## ✨ Features

- 🕰 **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.

## Screenshots

![image](https://github.com/user-attachments/assets/c9a38811-55b8-45b4-ac06-78ab4630ad65)

## Requirements

- **Android API Level 24** or higher
- **Kotlin 1.8** or later
- **Jetpack Compose** for building modern, UI-centric Android applications

## Usage
```kotlin
@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)
)
}
}
}
```
## Installation

Clone this repository:
```bash
git clone https://github.com/CoderBDK/Clock.git
```
## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.