Tencent Interview

I came across stormzhang’s Tencent interview questions and decided to work through them, documenting my answers and thought process. Topics covered: Android fundamentals (processes, Activities, Handler) Screen density and resource qualifiers Thread synchronization in Java System design (resumable downloads, network architecture) ...

December 8, 2014 · 3 min · haoxiqiang

Wireless Debugging on Android

Ever since getting a Nexus device, I never wanted to plug in a USB cable again. Android supports ADB debugging over WiFi, making cable-free development a reality. ...

December 5, 2014 · 2 min · haoxiqiang

Android's SQLite

SQLite is a lightweight relational database engine built into Android, ideal for local data persistence. The android.database.sqlite package provides everything you need without additional setup. ...

December 1, 2014 · 2 min · haoxiqiang

Android's Palette

The Palette library, part of Android Support Library (now migrated to AndroidX palette), extracts representative colors from a Bitmap. In Material Design, deriving UI colors from imagery is a common pattern, and Palette makes this straightforward. ...

November 3, 2014 · 3 min · haoxiqiang

Android RecyclerView (Part 2): Parallax Scrolling

Parallax scrolling is a common UI effect where different layers move at different speeds during scrolling, creating a sense of depth. ...

November 2, 2014 · 2 min · haoxiqiang

Android RecyclerView

RecyclerView is a more flexible replacement for ListView. According to the official documentation, it efficiently maintains a limited collection of scrolling data items, and is recommended when your Views need to interact with user gestures and network data. ...

November 1, 2014 · 2 min · haoxiqiang

Android Canvas (Part 2): Clipping

Canvas clipping limits the drawing region: only content within the clipped area is visible. ...

October 3, 2014 · 2 min · haoxiqiang

Android Canvas (Part 1)

A View renders its content by “drawing” — using a canvas (Canvas) and a paintbrush (Paint). The Canvas obtained through the onDraw method is directly composited onto the View. ...

October 2, 2014 · 4 min · haoxiqiang

Android Custom View (Part 2): Measurement Modes

...

October 1, 2014 · 1 min · haoxiqiang

Android Custom View (Part 1)

When you first start writing custom Views in Android, it’s common to feel unsure where to begin. Generally, there are two approaches: From scratch: Extend View and implement the appearance entirely through calculation and drawing. Extend an existing View: Add child views to an existing component, or override methods to change its behavior. ...

October 1, 2014 · 3 min · haoxiqiang