Tag

Custom View

0 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Aug 28, 2024 · Mobile Development

AutoHeightViewPager: Dynamically Adjusting ViewPager Height in Android

The article introduces AutoHeightViewPager, a custom ViewPager subclass that measures the current page’s view height and overrides onMeasure to resize itself, interpolating between pages during scroll via an AutoHeightPager‑compatible adapter, thereby eliminating blank space or clipping and providing smooth height transitions for variable‑sized content.

Custom ViewDynamic HeightKotlin
0 likes · 9 min read
AutoHeightViewPager: Dynamically Adjusting ViewPager Height in Android
Sohu Tech Products
Sohu Tech Products
Jul 10, 2024 · Mobile Development

A New Technical Solution for Android Nested Scrolling: NestedScrollFrameLayout

Introducing NestedScrollFrameLayout, a FrameLayout subclass that implements NestedScrollingChild, enables any wrapped view to participate in Android nested scrolling—including touch and fling—without modifying the child, offering one‑click integration, smoother continuous scrolls, and dramatically lower development and maintenance costs.

Custom ViewFlingMobile Development
0 likes · 12 min read
A New Technical Solution for Android Nested Scrolling: NestedScrollFrameLayout
Sohu Tech Products
Sohu Tech Products
Apr 12, 2023 · Mobile Development

HorStickyNavLayout: A Sticky Navigation Layout for RecyclerView with Interactive Prompt

This article introduces HorStickyNavLayout, a custom Android ViewGroup that enhances RecyclerView horizontal scrolling with a sticky footer prompting users to discover more content, detailing its architecture, nested scrolling handling, fling behavior, and animation logic to improve interaction without extra item views.

Custom ViewMobile DevelopmentRecyclerView
0 likes · 7 min read
HorStickyNavLayout: A Sticky Navigation Layout for RecyclerView with Interactive Prompt
Sohu Tech Products
Sohu Tech Products
Dec 14, 2022 · Mobile Development

Implementing a Drag‑and‑Bounce Custom View with Explosion Effect in Android (Kotlin)

This tutorial explains how to build an Android custom view that lets a large circle be dragged, scales a smaller circle based on distance, snaps back with a bounce animation when released inside a boundary, or plays an explosion sequence when released outside, using Kotlin, Bézier curves, and WindowManager integration.

Bezier CurveCustom ViewKotlin
0 likes · 19 min read
Implementing a Drag‑and‑Bounce Custom View with Explosion Effect in Android (Kotlin)
LOFTER Tech Team
LOFTER Tech Team
Aug 22, 2022 · Mobile Development

Custom Nested Scrolling Layout Implementation for Lofter Personal Homepage on Android

This article details the design and implementation of a custom nested scrolling layout for the Lofter 7.1.0 personal homepage, covering the selection of Android coordinator components, the underlying NestedScrolling mechanism, step‑by‑step integration, code analysis, inertia handling, and animation management.

Custom ViewKotlinMobile Development
0 likes · 18 min read
Custom Nested Scrolling Layout Implementation for Lofter Personal Homepage on Android
Yiche Technology
Yiche Technology
May 19, 2022 · Mobile Development

Implementing a Custom Two-Way Switch with Ripple Animation in Android

This article explains how to create a custom Android view that functions as a two‑way vertical switch with top‑bottom activation, indicator dots, ripple effects, dynamic text and color changes, and provides the full implementation steps from drawing to touch handling and external control.

Custom ViewMobile UIandroid
0 likes · 6 min read
Implementing a Custom Two-Way Switch with Ripple Animation in Android
Sohu Tech Products
Sohu Tech Products
Mar 9, 2022 · Mobile Development

Using Custom Drawable to Simplify Complex Android Views and Implement a Moving Basketball Example

This article explains how to leverage Android's custom Drawable to separate drawing logic from View interaction, demonstrates extracting reusable Drawable components for complex charts, and provides a complete Kotlin example that draws a basketball and animates it to the user's touch point.

Custom ViewDrawableKotlin
0 likes · 11 min read
Using Custom Drawable to Simplify Complex Android Views and Implement a Moving Basketball Example
Snowball Engineer Team
Snowball Engineer Team
Sep 24, 2021 · Mobile Development

Custom Stock K-Line Chart with Jetpack Compose: Drawing and Gesture Handling

This article demonstrates how to build a custom stock K-line chart in Android using Jetpack Compose, covering the transition from traditional View drawing to Compose's Canvas API, detailed code for rendering, and implementing drag, long‑press, and pinch‑zoom gestures with state‑driven UI updates.

CanvasCustom ViewJetpack Compose
0 likes · 16 min read
Custom Stock K-Line Chart with Jetpack Compose: Drawing and Gesture Handling
Snowball Engineer Team
Snowball Engineer Team
Sep 8, 2021 · Mobile Development

A Robust Approach to Android UI Component Exposure Tracking Using Custom View Lifecycle Management

This article analyzes the limitations of traditional Android exposure tracking methods that rely on parent container lifecycles and introduces a reusable, low-intrusion solution using a custom layout that leverages core View lifecycle callbacks and drawing listeners to accurately detect component visibility and duration.

Android DevelopmentCustom ViewExposure Analytics
0 likes · 15 min read
A Robust Approach to Android UI Component Exposure Tracking Using Custom View Lifecycle Management
Sohu Tech Products
Sohu Tech Products
Jul 21, 2021 · Mobile Development

Implementation of a Custom Progress View with Particle Animation on Android

This article explains how to build a custom Android progress view featuring random particle motion, radial gradient backgrounds, sector clipping, pointer color changes, animated color transitions, and a jumping number display, with complete source code and step‑by‑step implementation details.

Custom ViewMobile DevelopmentParticle Animation
0 likes · 13 min read
Implementation of a Custom Progress View with Particle Animation on Android
Sohu Tech Products
Sohu Tech Products
Nov 25, 2020 · Mobile Development

Applying Android drawBitmapMesh for Image Warping Effects (Face Slimming, Curtain, Water Ripple)

This article explains how Android's drawBitmapMesh method can be used to split a bitmap into a mesh, manipulate the vertex array to achieve various image‑warping effects such as face slimming, curtain folding and water‑ripple animations, and provides complete Java code examples and implementation steps.

Custom ViewMobile Developmentandroid
0 likes · 17 min read
Applying Android drawBitmapMesh for Image Warping Effects (Face Slimming, Curtain, Water Ripple)
Sohu Tech Products
Sohu Tech Products
Jul 1, 2020 · Mobile Development

Android Custom View Implementation and Canvas Drawing Tutorial

This article introduces how to create custom Android Views by overriding onMeasure, onLayout, and onDraw, explains the three-stage view rendering process, and provides detailed examples of Canvas drawing methods—including drawing points, lines, shapes, text, images, and bitmap manipulation—along with code snippets and usage tips.

CanvasCustom ViewKotlin
0 likes · 31 min read
Android Custom View Implementation and Canvas Drawing Tutorial
Sohu Tech Products
Sohu Tech Products
May 6, 2020 · Mobile Development

Understanding Android NestedScrolling Mechanism – Fundamentals, Core Flow, and Implementation

This article explains the Android NestedScrolling mechanism, compares it with the traditional view event dispatch system, details the core scrolling flow, presents the key NestedScrollingParent and NestedScrollingChild interfaces with code examples, and walks through a practical demo and source‑level analysis.

Custom ViewMobile DevelopmentNestedScrolling
0 likes · 19 min read
Understanding Android NestedScrolling Mechanism – Fundamentals, Core Flow, and Implementation
Baidu App Technology
Baidu App Technology
Oct 15, 2019 · Mobile Development

Multi-Child View Nested Scrolling Solution in Baidu App

Baidu App replaced its original two‑view nested‑scrolling setup with a flexible, component‑based solution that leverages Android’s NestedScrolling API to coordinate any number of child views—via ILinkageScroll, LinkageScrollHandler and ChildLinkageEvent—handling pre‑scroll, fling, scrollbar aggregation, and a Xiaomi‑specific OverScroller fix, with code available open‑source.

Custom ViewFling GestureNestedScrolling
0 likes · 15 min read
Multi-Child View Nested Scrolling Solution in Baidu App