gitmyhub

AndroidProject

Java ★ 6.9k updated 1mo ago

Android 技术中台,但愿人长久,搬砖不再有

A production-tested Android app starter template in Java with common screens, dialogs, navigation, and utilities pre-built, clone it to skip the repetitive setup at the start of every new app.

JavaAndroid SDKsetup: moderatecomplexity 3/5

AndroidProject is a starter template for building Android apps in Java. Instead of setting up a project from scratch each time, a developer can clone this repository and get a pre-built foundation with common screens, dialogs, utilities, and architectural patterns already in place. The idea is to reduce the repetitive setup work at the beginning of every new app project.

The project has been maintained for over seven years and has been used in real production apps at multiple companies. According to the author, starting from this template can cut development time by roughly half compared to building everything from the ground up. The codebase has gone through continuous review and optimization passes covering memory usage, layout performance, and code structure.

On the design side, the project follows Android SDK coding conventions and includes comments on complex sections. Common functionality is consolidated into shared base classes or utility classes rather than copied across screens, so the codebase stays consistent. The author also adapted Android's built-in screen-transition system to make it simpler to pass results between screens without writing boilerplate callback code.

The template handles display compatibility across small-screen phones, full-screen phones, and phones with on-screen navigation buttons. The author notes that compatibility testing involved hundreds of devices contributed by community members, catching edge cases that would be nearly impossible to find alone.

Beyond the core template, the author maintains a set of companion libraries that the project draws from, including tools for handling runtime permissions, showing toast messages, making network requests, managing title bars, creating floating windows, and switching the app language. A Kotlin version of the same template exists at AndroidProject-Kotlin for teams that prefer Kotlin over Java.

Where it fits