android-ui-java

Builds Android user interfaces with Java, XML layouts, ViewBinding, and MVVM ViewModels.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill android-ui-java-22teikk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: android-ui-java
Source: https://github.com/22Teikk/22Teikk-Agent-Skills-Hub/tree/main/packs/android/skills/android-ui-java
Command: npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill android-ui-java-22teikk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Java-based Android UI development often suffers from memory leaks, janky RecyclerViews, and deeply nested layouts that hurt performance. This Skill provides concrete patterns and guardrails for building responsive, accessible Android interfaces with Java and XML layouts following MVVM architecture. ## Core Features & Use Cases - ViewBinding & MVVM Setup: Wire Activities and Fragments to ViewModels exposing LiveData, with proper lifecycle handling like clearing disposables in onCleared(). - Optimized RecyclerViews: Implement ListAdapter with DiffUtil.ItemCallback instead of notifyDataSetChanged() for smooth, animated list updates. - Flat Layout Hierarchies: Use ConstraintLayout, <merge>, and <include> tags to avoid nested layout measurement passes. - Use Case: When building a task list screen in a Java Android app, use this Skill to generate the ViewModel with LiveData state, the Activity with ViewBinding, and a DiffUtil-powered adapter that avoids memory leaks and UI jank. ## Quick Start Use the android-ui-java skill to create a Java Activity with ViewBinding, a LiveData-based ViewModel, and a DiffUtil RecyclerView adapter for my task list screen.

Frequently Asked Questions about android-ui-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a RecyclerView efficiently in Android Java?▼

Use ListAdapter with DiffUtil.ItemCallback instead of a standard RecyclerView.Adapter. DiffUtil calculates item-level changes so only affected rows redraw, avoiding the full-list refresh and jank caused by notifyDataSetChanged().

How to use ViewBinding with MVVM in a Java Android app?▼

Inflate the generated binding class in onCreate(), then observe LiveData exposed by your ViewModel to update views reactively. The ViewModel holds UI state and clears its disposables in onCleared() to prevent leaks.

Should I use Java XML layouts or Jetpack Compose for Android UI?▼

This Skill covers Java with XML layouts and ViewBinding only. For Kotlin or Compose-based UI implementations, use the android-ui-kotlin skill instead, as the patterns and lifecycle handling differ significantly.

Why does my Fragment leak memory when using ViewBinding?▼

Fragments outlive their views, so holding the binding reference after the view is destroyed causes leaks. Always set the binding variable to null in onDestroyView() to release the view hierarchy.

Why are nested layouts bad for Android performance?▼

Nested LinearLayout or RelativeLayout hierarchies require multiple measurement passes, multiplying rendering time and causing dropped frames. Use ConstraintLayout as a flat root container with match_constraint (0dp) instead of wrap_content.