RepoPilot

How do their APIs compare?

About harlonwang/avloadingindicatorview · 2 messages · last activity 8/14/2026

Question

How do their APIs compare?

RepoPilot

These two projects aren't really comparable as APIs in the same sense — one is a UI widget's Java API surface, the other is an HTTP control API for a desktop app. Here's how each works and where they differ:

harlonwang/avloadingindicatorview — a Java widget API

This is a custom Android View subclass, AVLoadingIndicatorView, and its "API" is a set of public Java methods plus XML attributes:

  • Instantiation: standard View constructors that call init(), which reads XML attrs (indicatorName, indicatorColor, minWidth/maxWidth/minHeight/maxHeight) via TypedArray [library/src/main/java/com/wang/avi/AVLoadingIndicatorView.java:L60-L99].
  • setIndicator(Indicator d) — sets the drawable-like animated indicator object directly, detaching the old one's callback first [library/src/main/java/com/wang/avi/AVLoadingIndicatorView.java:L155-L169].
  • setIndicator(String indicatorName) — a reflection-based overload that resolves a string like "BallPulseIndicator" to a class in com.wang.avi.indicators (or a fully-qualified name), instantiates it via Class.forName(...).newInstance(), and passes it to setIndicator(Indicator) [library/src/main/java/com/wang/avi/AVLoadingIndicatorView.java:L152-L179]. This reflection dependency is why the README calls out Proguard keep rules for com.wang.avi.indicators.**.
  • setIndicatorColor(int color) — delegates to the current indicator's setColor [library/src/main/java/com/wang/avi/AVLoadingIndicatorView.java:L146-L149].
  • getIndicator() — accessor for the current Indicator [library/src/main/java/com/wang/avi/AVLoadingIndicatorView.java:L152-L154].
  • show() / hide() / smoothToShow() / smoothToHide() — documented in the README as the animation start/stop entry points [README.md:L59-L74], implemented with debounce/delay logic via mDelayedShow/mDelayedHide runnables and MIN_SHOW_TIME/MIN_DELAY constants [library/src/main/java/com/wang/avi/AVLoadingIndicatorView.java:L26-L45].

Custom indicators extend an abstract Indicator base and implement draw(Canvas, Paint) plus onCreateAnimators(), as shown in the sample MyCustomIndicator [app/src/main/java/com/wang/avi/sample/MyCustomIndicator.java:L15-L73] and library indicators like BallGridBeatIndicator [library/src/main/java/com/wang/avi/indicators/BallGridBeatIndicator.java:L14-L77]. This is the library's extension "API" — a small, in-process, object-oriented surface with no network or IPC involved.

proxyee-down-org/proxyee-down — an HTTP control API

This is a desktop download-manager app whose GUI process exposes local HTTP endpoints via Netty/Spring controllers:

  • ApiController at path api, with @RequestMapping("createTask") — parses query params from the request URI and calls DownApplication.INSTANCE.loadUri(...) to open a task-creation screen in the embedded JavaFX UI, then returns a bare 200 OK with a CORS header [main/src/main/java/org/pdown/gui/http/controller/ApiController.java:L17-L47]. This looks like a native-app bridge endpoint invoked from the browser extension/front-end, not a REST resource API.
  • PacController at pdown.pac — dynamically builds and serves a PAC (proxy auto-config) script for browser proxy routing, using domains sourced from ExtensionContent.getProxyWildCards() and templating in the local proxy port [main/src/main/java/org/pdown/gui/http/controller/PacController.java:L15-L57].
  • Separately, DownApplication.initRest() boots a Spring-based DownRestServer bound to a configurable REST_PORT, distinct from the front-end/native-API HTTP servers configured via FRONT_PORT/API_PORT in `

Public Q&A. Generated by RepoPilot from the actual source of harlonwang/avloadingindicatorview. AI answers can be incomplete or stale — verify before relying on them.