Tagged articles

LayoutInflater

6 articles · Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 9, 2024 · Mobile Development

Understanding Android LayoutInflater: Usage, inflate Methods, Factory and Factory2

This article explains how Android's LayoutInflater converts XML layout files into View objects, demonstrates the various ways to obtain and use a LayoutInflater, details the overloads of the inflate method, and shows how to customize view creation with Factory and Factory2 interfaces, including practical code examples.

AndroidFactory2Java
0 likes · 20 min read
Understanding Android LayoutInflater: Usage, inflate Methods, Factory and Factory2
Xiaohongshu Tech REDtech
Xiaohongshu Tech REDtech
Dec 7, 2022 · Mobile Development

Optimizing Android Layout Inflation with Layout2Code: An APT‑Based Approach

The team created Layout2Code, an APT‑based generator that translates XML layouts into Kotlin code at build time—handling merge and include tags and supporting custom Views—cutting homepage layout inflation by over 200 ms, boosting performance metrics while requiring far less maintenance than traditional X2C solutions.

AndroidKotlinLayoutInflater
0 likes · 7 min read
Optimizing Android Layout Inflation with Layout2Code: An APT‑Based Approach
Sohu Tech Products
Sohu Tech Products
Jun 2, 2021 · Mobile Development

Comprehensive Guide to Android Skinning and Theme Switching

This article provides an in‑depth overview of Android skinning, covering UI specifications, product‑level thinking, code implementations, dynamic refresh mechanisms, layout inflation interception, skin package loading strategies, performance optimizations, and future directions such as drawable skinning and Material You integration.

AndroidDynamic RefreshLayoutInflater
0 likes · 18 min read
Comprehensive Guide to Android Skinning and Theme Switching
AI Code to Success
AI Code to Success
May 13, 2020 · Mobile Development

Turn Any Android App Grayscale with a Few Custom Views

This article explains how to apply a full‑screen grayscale effect to Android apps by using a single CSS rule for web pages and custom View subclasses—GrayImageView, GrayTextView, GrayLinearLayout, and GrayFrameLayout—plus an Activity onCreateView override to replace the root content view, complete with code snippets and practical tips.

AndroidAppCompatCanvas
0 likes · 15 min read
Turn Any Android App Grayscale with a Few Custom Views