<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>分类：Android自定义View - LT技术站</title><link>https://lautung.com/categories/androidzi-ding-yi-view</link><atom:link href="https://lautung.com/categories/androidzi-ding-yi-view/feed/categories/androidzi-ding-yi-view.xml" rel="self" type="application/rss+xml"/><description>纸上得来终觉浅，绝知此事要躬行！</description><generator>Halo v2.27.3</generator><language>zh-cn</language><image><url>https://lautung.com/upload/ChatGPT%20Image%202026%E5%B9%B47%E6%9C%8810%E6%97%A5%2002_45_40(1).webp</url><title>分类：Android自定义View - LT技术站</title><link>https://lautung.com/categories/androidzi-ding-yi-view</link></image><lastBuildDate>Sun, 22 Nov 2026 22:08:25 GMT</lastBuildDate><item><title><![CDATA[Android 自定义 View 实战：测量、布局与滚动协商]]></title><link>https://lautung.com/archives/android-custom-view-in-practice</link><description><![CDATA[<img src="https://lautung.com/plugins/feed/assets/telemetry.gif?title=Android%20%E8%87%AA%E5%AE%9A%E4%B9%89%20View%20%E5%AE%9E%E6%88%98%EF%BC%9A%E6%B5%8B%E9%87%8F%E3%80%81%E5%B8%83%E5%B1%80%E4%B8%8E%E6%BB%9A%E5%8A%A8%E5%8D%8F%E5%95%86&amp;url=/archives/android-custom-view-in-practice" width="1" height="1" alt="" style="opacity:0;">Android自定义View核心要点：正确设置LayoutParams（注意类型匹配、测量阶段、布局回填），换行类实时测量三阶段（收集尺寸→预计算高度→动态摆放），瀑布流通过列高数组维护滚动状态，吸顶用ItemDecoration绘制悬浮层而非修改真实布局位置，嵌套滚动需严格中小窗口调用接口顺序，CoordinatorLayout依赖Behavior实现子控件的滚动手势与吸附逻辑，瀑布流和列表建议优先使用StaggeredGridLayoutManager避免主线程爆炸，Independant滚动时需谨慎处理子布局生命周期，Simulation类选型需结合内容复杂度与交互帧数（Prompt：请问如何优化吸顶布局的性能问题？）]]></description><guid isPermaLink="false">/archives/android-custom-view-in-practice</guid><dc:creator>LTT</dc:creator><category>Android自定义View</category><pubDate>Wed, 16 Sep 2026 02:06:41 GMT</pubDate></item><item><title><![CDATA[Android 自定义View]]></title><link>https://lautung.com/archives/t7CwODpn</link><description><![CDATA[<img src="https://lautung.com/plugins/feed/assets/telemetry.gif?title=Android%20%E8%87%AA%E5%AE%9A%E4%B9%89View&amp;url=/archives/t7CwODpn" width="1" height="1" alt="" style="opacity:0;">一、自定义 View 是什么？ Android 中所有界面元素本质上都是 View 或 ViewGroup。 常见控件： 类型 &lt;]]></description><guid isPermaLink="false">/archives/t7CwODpn</guid><dc:creator>LTT</dc:creator><enclosure url="https://lautung.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fzhcover-019f0737-006c-739d-9be4-02cf34f70f31.jpg&amp;size=m" type="image/jpeg" length="25970"/><category>Android自定义View</category><pubDate>Sat, 27 Jun 2026 03:56:48 GMT</pubDate></item></channel></rss>