GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BetterAndroid/BetterAndroid: 🛠️ Create more useful tool extensions for Android.

BranchesTags
Open more actions menu

Latest commit

 

History

757 Commits
757 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.idea
.idea
 
 
android-bom
android-bom
 
 
compose-extension
compose-extension
 
 
compose-multiplatform
compose-multiplatform
 
 
docs-source
docs-source
 
 
gradle
gradle
 
 
samples/demo-android
samples/demo-android
 
 
system-extension-lint
system-extension-lint
 
 
system-extension
system-extension
 
 
ui-component-adapter-lint
ui-component-adapter-lint
 
 
ui-component-adapter
ui-component-adapter
 
 
ui-component-lint
ui-component-lint
 
 
ui-component
ui-component
 
 
ui-extension-lint
ui-extension-lint
 
 
ui-extension
ui-extension
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README-zh-CN.md
README-zh-CN.md
 
 
README.md
README.md
 
 
build.gradle.kts
build.gradle.kts
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

Better Android

GitHub license Telegram QQ

LOGO

Create more useful tool extensions for Android.

English | 简体中文

LOGO BetterAndroid

This project belongs to the organization above. Click the link to follow us and discover more awesome projects.

Project Reason

As the Android system continues to evolve, native development demands a growing learning curve. While there are countless utilities available, new fragmentation issues and edge cases emerge endlessly.

I originally created this project to address the friction I encountered in daily Android development—mostly dealing with cumbersome and outdated system APIs. Guided by the principle of "not reinventing the wheel", BetterAndroid focuses on enhancing what is already there.

From UI rendering to system-level interactions, it seamlessly extends native APIs. It is explicitly designed to tackle "black box" scenarios, bridging the gap between official behaviors and the quirks of third-party OEM ROMs.

Leveraging the power of Kotlin, everything provided here remains strictly non-intrusive. It ensures you can enjoy a smoother, more elegant developer experience without compromising the native ecosystem.

This library is a culmination of solutions refined across multiple real-world apps, with a significant portion of its core battle-tested and decoupled from my earlier project, PureReader.

Features Overview

BetterAndroid splits common but verbose Android work into several modules that can be introduced independently, including system version checks, ROM detection, UI components, system bars, adapters, and notifications. You can pick only what your project needs, or use the BOM to manage multiple Android module versions together.

If your code is filled with Build.VERSION.SDK_INT, Build.VERSION_CODES, or hard-coded API levels, system-extension makes version checks easier to read. It also provides detection for common third-party ROMs, which is useful when handling compatibility logic for OEM-customized Android systems.

AndroidVersion.require(AndroidVersion.T) {
    // Execute relevant code.
}

if (RomType.matches(RomType.HyperOS)) {
    // Execute relevant code.
}

For traditional View-based projects, ui-component provides preset Activity and Fragment components with ViewBinding, base views, and Compose entry support. This reduces repeated setContentView, inflate, and binding boilerplate during page initialization.

class MainActivity : AppBindingActivity<ActivityMainBinding>() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding.mainText.text = "Hello World!"
    }
}

System bars and Window Insets are easy places to hit edge-to-edge, cutout, and immersive-mode compatibility issues. SystemBarsController takes over system bar styles, visibility, and basic Edge-to-Edge behavior, while the Insets extensions in ui-extension help reduce repeated compatibility handling.

systemBars.init(rootView)
systemBars.behavior = SystemBarBehavior.SHOW_TRANSIENT_BARS_BY_SWIPE
systemBars.hide(SystemBars.STATUS_BARS)

For list screens, ui-component-adapter integrates RecyclerView.Adapter, ViewBinding, item click events, and diff updates into a compact DSL. You can bind data quickly, or use RecyclerAsyncDiffer for a more modern list submission workflow.

val adapter = recyclerView.bindAdapter<MyEntity> {
    onBindData { listData }
    onBindItemView<AdapterMyLayoutBinding> { binding, entity, position ->
        binding.textView.text = entity.name
    }
    onItemViewClick { itemView, entity, position ->
        // Your code here.
    }
}

System notifications are also wrapped as a more readable DSL. Notification channels are created automatically on the first post and compatibility for lower Android versions is handled for you, while the remaining parameters stay aligned with NotificationCompat.Builder.

val notification = context.createNotification(
    channel = NotificationChannel("my_channel_id") {
        name = "My Channel"
        description = "My channel description."
    }
) {
    smallIconResId = R.drawable.ic_my_notification
    contentTitle = "My Notification"
    contentText = "Hello World!"
}

notification.post()

Get Started

LOGO BetterAndroid Documentation

You can go to the documentation page for more detailed tutorials and content.

What's next?

  1. Add dependencies: Find the module you need and add it to your project.
  2. Sync the project: After a Gradle sync, you can start using BetterAndroid.

In the opened page, select the Quick Start section in the sidebar to continue reading.

More Projects

Hey, wait a second! 👋

If this project was helpful, why not stick around and check out more of my work below?

Feel free to leave a follow or a star ⭐️ if they bring you value!

→ Click here to discover more of my projects ←

Star History

Star History Chart

License

  • Apache-2.0
Apache License Version 2.0

Copyright (C) 2019 HighCapable

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Copyright © 2019 HighCapable

About

🛠️ Create more useful tool extensions for Android.

betterandroid.github.io/BetterAndroid/

Topics

androidandroid-librariesandroid-libraryandroid-toolkitcomposecompose-multiplatformjetpack-composekotlin

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

162 stars

Watchers

1 watching

Forks

9 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.