8000 GitHub - CoderBDK/Clock: Analog Clock
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CoderBDK/Clock

Repository files navigation

🕰 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

Requirements

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

Usage

@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:

git clone https://github.com/CoderBDK/Clock.git

License

This project is licensed under the MIT License. See the LICENSE file for details.

0