explaingit

frankiesardo/icepick

Analysis updated 2026-07-03

3,728ClojureAudience · developerComplexity · 2/5Setup · easy

TLDR

Icepick is an Android library that automatically saves and restores your screen's state on rotation or system recreation using a simple @State annotation, eliminating repetitive boilerplate code in Activities, Fragments, and custom Views.

Mindmap

mindmap
  root((Icepick))
    Problem Solved
      Screen rotation
      State loss
      Boilerplate removal
    How It Works
      @State annotation
      Build-time codegen
      Save restore calls
    Supported Types
      Activities
      Fragments
      Custom Views
    Setup
      Two Gradle deps
      Clojars repository
      Proguard rules
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically preserve form input, scroll position, or selected items across screen rotations in an Android app without writing manual save/restore code.

USE CASE 2

Save and restore custom View state in an Android component by annotating fields with @State instead of overriding onSaveInstanceState manually.

USE CASE 3

Use Icepick's custom bundler interface to persist data types the library doesn't support out of the box.

USE CASE 4

Reduce state-management boilerplate across a large Android codebase by replacing manual Bundle read/write logic with @State annotations.

What is it built with?

JavaAndroidProguard

How does it compare?

frankiesardo/icepickfunctional-koans/clojure-koansbabashka/babashka
Stars3,7283,7984,494
LanguageClojureClojureClojure
Setup difficultyeasymoderateeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Proguard rules must be added manually for release builds or the annotation-generated code will be stripped out incorrectly.

In plain English

Icepick is a library for Android app developers that solves a specific and repetitive problem: saving and restoring an app's state when the system pauses or recreates a screen. On Android, when a user rotates their phone or the operating system needs to free up memory, the current screen gets recreated. Any data the screen was holding, like what a user had typed or which item was selected, gets lost unless the developer explicitly saves it and loads it back. Without a helper, this requires writing a fair amount of repetitive code for every piece of data you want to preserve. Icepick removes that burden. You mark the fields in your code with a simple annotation called @State, and Icepick generates the save and restore code automatically at build time. You still call Icepick's save and restore methods in the right places, but you no longer have to write the individual field-by-field logic. The library works with Activities (the main screen type in Android), Fragments (sub-sections of a screen), and custom View components. It also supports a custom bundler interface for developers who need to save data types that Icepick does not handle by default, which is useful when combined with other serialization libraries. The README includes a note for teams using Proguard, which is a tool that shrinks and obfuscates Android apps for release. Without adding the listed Proguard rules, the library's generated code could be stripped out incorrectly. Setup involves adding two dependencies to the project build file, both available from the Clojars repository. This is a developer utility with no user-facing interface of its own. Its value is purely in reducing the amount of code an Android developer has to write and maintain.

Copy-paste prompts

Prompt 1
Show me how to use Icepick in an Android Activity to save and restore a list of strings and an integer counter when the screen is rotated.
Prompt 2
I'm adding Icepick to an existing Android project. What are the two Gradle dependencies, where do I call Icepick.saveInstanceState, and where do I call Icepick.restoreInstanceState?
Prompt 3
My Android app uses Proguard for release builds. What Proguard rules do I need to add so that Icepick's generated code isn't stripped out incorrectly?
Prompt 4
How do I use Icepick's custom bundler interface to save a Parcelable type that the library doesn't handle by default?

Frequently asked questions

What is icepick?

Icepick is an Android library that automatically saves and restores your screen's state on rotation or system recreation using a simple @State annotation, eliminating repetitive boilerplate code in Activities, Fragments, and custom Views.

What language is icepick written in?

Mainly Clojure. The stack also includes Java, Android, Proguard.

How hard is icepick to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is icepick for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub frankiesardo on gitmyhub

Verify against the repo before relying on details.