Design Patterns

Design Patterns are reusable solutions to common problems in object-oriented design. The 23 classic patterns were systematized by the Gang of Four (GoF: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides) in their 1994 book Design Patterns: Elements of Reusable Object-Oriented Software. This article is compiled from a blog post by smallnest and a StackOverflow discussion on GoF design pattern implementations in the Java API. View PDF Overview ...

March 30, 2015 · 5 min · haoxiqiang

Remote Debugging on Android with Chrome

Chrome DevTools supports remote debugging of web pages and WebView applications on Android devices. This feature is invaluable for mobile front-end development and hybrid app development, allowing you to use the full suite of desktop Chrome DevTools to debug mobile pages. ...

March 24, 2015 · 3 min · haoxiqiang

Bezier Curve Practice

Bézier curves are widely used in computer graphics to model smooth curves. They were independently developed by French engineers Pierre Bézier (Renault) and Paul de Casteljau (Citroën) in the 1960s. ...

March 4, 2015 · 2 min · haoxiqiang

Android Property Animation

Property Animation is a powerful animation framework introduced in Android 3.0 (API 11). Unlike the older View Animation (tween animation) system, property animation actually changes the properties of the target object, not just its rendered appearance. ...

March 3, 2015 · 3 min · haoxiqiang

SQLite Limits Explained: Tracing a SQLiteFullException

While debugging a recent bug, I ran into a peculiar issue: android.database.sqlite.SQLiteFullException: database or disk is full (code 13). After extensive research without a definitive root cause, I am sharing my findings here in the hope that others with similar experiences can help shed light on this. ...

February 28, 2015 · 4 min · haoxiqiang

Getting Started with Go: First Program and Basic Practices

This article covers the four most fundamental steps in learning Go: writing your first program, creating a utility library, writing unit tests, and using remote packages. The content follows the original GOPATH workflow from the early Go 1.x era. Note: Go Modules were introduced in Go 1.11 and became the default in Go 1.16, effectively replacing GOPATH mode. For new projects, use go mod init to create a module instead of manually setting up GOPATH. The examples below preserve the original style for reference. ...

February 10, 2015 · 3 min · haoxiqiang

Android Notification Guide

The notification system is a critical channel for user-app interaction on Android — it keeps users informed of important events even when the app is not in the foreground, such as incoming messages or calendar reminders. Notifications received a major overhaul in Android 4.1 (Jelly Bean) and continued to see refinements through Android 5.0 (Lollipop). Since 4.1, Android supports action buttons at the bottom of notifications, allowing users to perform common tasks directly without opening the app. Note: This article was written for the Android 4.1–5.0 era APIs. Starting from Android 8.0 (API 26), all notifications must be assigned to a Notification Channel. Android 13 (API 33) introduced the POST_NOTIFICATIONS runtime permission. The code examples below use NotificationCompat for backward compatibility; visual results may vary across devices. ...

January 29, 2015 · 4 min · haoxiqiang

Android Learning Resources Guide

Note: This post was written in 2015. Some links may no longer be valid. The recommendations reflect the ecosystem at that time, but the core learning path and methodology remain relevant. Foreword We all start somewhere. For any technology, everyone begins with Hello World. What puzzles me is why some people improve 100% in a year while others only 20% — or even stagnate. Is it IQ? In my opinion, it is more likely a matter of learning method. While on my wedding leave, I was writing blog posts and searching for learning materials. I found that relying solely on Baidu was terribly inefficient — at least half the time was wasted on useless pages. I decided to spend a few evenings organizing my bookmarks, making sure most resources are accessible from within China. The following is a curated list for beginner-to-intermediate Android developers. As for advanced-level topics — I’m not quite qualified to speak on those yet. ...

January 26, 2015 · 5 min · haoxiqiang

Setting Up Android Environment, Source Code, and Tools Using Chinese Mirrors

Note: This post was written in 2015. Some mirror URLs may have changed or become unavailable. As of 2025, the recommended mirrors for Chinese developers are Tsinghua TUNA, USTC, and other university mirrors, or simply using Android Studio’s built-in SDK Manager. For developers behind the Great Firewall of China, accessing Google’s servers directly is slow or unreliable. This post covers mirror-based solutions for: Android SDK updates Android Studio downloads AOSP source code downloads Android NDK downloads ...

January 16, 2015 · 2 min · haoxiqiang

Android Fragment$InstantiationException: Causes and Solutions

1 2 android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment make sure class name exists, is public, and has an empty constructor that is public This error used to be rare, but recently it spiked. After investigation, here are the causes and solutions. ...

January 7, 2015 · 2 min · haoxiqiang