Android Foldable Adapter

0•

Diagnoses and resolves Android configuration change issues for foldable devices to prevent activity recreation and state loss.

The Android Foldable Adapter is a specialized Claude Code skill designed to help developers navigate the complexities of foldable screen adaptation. It provides a structured diagnostic workflow and implementation patterns to handle configuration changes (like screenSize and screenLayout) that occur when a device is folded or unfolded. By automating the identification of manifest gaps, state loss vulnerabilities, and stale Fragment references, this skill ensures that Android applications maintain a seamless user experience across different screen states. It is particularly effective for fixing unresponsive UI elements and disappearing data in complex layouts.

主要功能

01Support for both Kotlin and Java environments with UTF-8 encoding compliance
02Automated diagnosis of AndroidManifest.xml for foldable-relevant configChanges
030 GitHub stars
04Implementation patterns for robust state saving and restoration (onSaveInstanceState)
05Workflow for fixing UI breakage during screen transitions
06Detection of Fragment reference invalidation in ViewPager2 and FragmentStateAdapter

使用场景

01Adapting legacy Android Activities to handle foldable screen configuration changes without recreation
02Fixing 'unresponsive' buttons caused by stale Activity references after a screen resize
03Preventing search results or form data from disappearing when a user folds their device