Tag

TextView

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 28, 2023 · Mobile Development

Using Custom Fonts, AutoLink, and Justification Mode in Android TextView

This article explains how to apply custom fonts, enable AutoLink, and use justification mode in Android TextView, providing step‑by‑step code examples for assets and res/font resources, XML attributes, and runtime settings for developers.

AndroidAutoLinkCustom Font
0 likes · 6 min read
Using Custom Fonts, AutoLink, and Justification Mode in Android TextView
Ximalaya Technology Team
Ximalaya Technology Team
Nov 15, 2023 · Mobile Development

Implementing Gradient Text Effects for Android Live Chat Nicknames

The article explains how to give privileged Android live‑chat users gradient nicknames by applying a LinearGradient shader via a custom GradientColorSpan, handling multi‑line text with restart or continuous strategies, and integrating these spans in a LiveGradientTextView that measures, inflates, and renders the gradient consistently across all live‑room scenarios.

AndroidCustom SpanShader
0 likes · 14 min read
Implementing Gradient Text Effects for Android Live Chat Nicknames
Sohu Tech Products
Sohu Tech Products
Nov 9, 2022 · Mobile Development

Implementing an Expandable TextView with Topic and URL Span Handling in Android

This article demonstrates how to build a custom Android TextView that supports clickable topic spans, URL interception, and smooth expand‑collapse behavior using StaticLayout measurements, custom ButtonSpan labels, and optional height‑animation, providing a reusable solution for rich mobile text displays.

AndroidMobile DevelopmentSpan
0 likes · 10 min read
Implementing an Expandable TextView with Topic and URL Span Handling in Android
vivo Internet Technology
vivo Internet Technology
Mar 16, 2022 · Mobile Development

Analyzing and Fixing TextView Marquee Reset Issue on Android 6.0+

The article shows how to diagnose the Android 6.0+ TextView marquee jump caused by a button’s setText triggering requestLayout and onMeasure, and fixes it by giving the button a fixed size instead of wrap_content, illustrating a systematic source‑code analysis and debugging workflow for UI issues.

AndroidChoreographerDebugging
0 likes · 14 min read
Analyzing and Fixing TextView Marquee Reset Issue on Android 6.0+
Kuaishou Tech
Kuaishou Tech
Aug 20, 2021 · Mobile Development

Analyzing Android TextView ANR Caused by getOffsetForHorizontal Loop Using Frida

This article investigates an Android ANR triggered by a while‑true loop in TextView's getOffsetForHorizontal, reproduces the issue on Pixel 2, explains how to extract trace files, compares Android Studio debugging with Frida dynamic hooking, and provides step‑by‑step instructions to reproduce and debug the bug.

ANRAndroidDebugging
0 likes · 11 min read
Analyzing Android TextView ANR Caused by getOffsetForHorizontal Loop Using Frida
Baidu Geek Talk
Baidu Geek Talk
Jan 20, 2021 · Mobile Development

Consistent TextView Line Spacing on Android: Analysis and Adaptation Solution

The article explains why Android TextView line spacing varies across devices due to mismatched FontMetrics calculations, and presents a low‑intrusion fix that uses a custom LineHeightSpan applied via an ETextView subclass to enforce a visual‑consistent line height equal to the text size on all screen resolutions.

AndroidCompatibilityLineSpacing
0 likes · 13 min read
Consistent TextView Line Spacing on Android: Analysis and Adaptation Solution
Baidu App Technology
Baidu App Technology
Mar 2, 2020 · Mobile Development

TextView Line Spacing Screen Adaptation Solution for Android

To solve Android’s screen‑fragmentation‑induced TextView line‑spacing inconsistencies, Baidu’s team analyzed the default line‑height calculation, then created a custom LineHeightSpan (ExcludeInnerLineSpaceSpan) applied through a subclassed ETextView to enforce visual‑defined line height, delivering a simple, low‑intrusion, cross‑resolution fix.

AndroidLine SpacingLineHeightSpan
0 likes · 12 min read
TextView Line Spacing Screen Adaptation Solution for Android
Snowball Engineer Team
Snowball Engineer Team
May 11, 2018 · Mobile Development

Understanding TextView Rendering and Span Usage in Android

This article explains how Android's TextView renders text, detailing its coordinate system, layout classes, span types, HTML conversion, and practical implementations such as custom ReplacementSpan and link handling within the Snowball app, providing developers with a comprehensive guide to advanced text styling.

AndroidMobile DevelopmentSpannable
0 likes · 13 min read
Understanding TextView Rendering and Span Usage in Android