Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@nativescript-community/ui-image

Package Overview
Dependencies
Maintainers
19
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript-community/ui-image - npm Package Compare versions

Comparing version
4.6.6
to
5.0.0
+65
platforms/android/...m/nativescript/image/CacheKeyStore.java
package com.nativescript.image;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.Transformation;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* In-memory store. StoredKeys now includes transformation and options raw key
* bytes so we don't
* need to re-create Transformation/Options objects in order to reconstruct the
* ResourceCacheKey.
*/
public final class CacheKeyStore {
public static class StoredKeys {
public final Key sourceKey;
public final Key signature;
public final int width;
public final int height;
public final Transformation<?> transformation; // optional in-memory only
public final byte[] transformationKeyBytes; // raw bytes written by transformation.updateDiskCacheKey
public final Class<?> decodedResourceClass;
public final Options options; // may be null or placeholder for in-memory
public final byte[] optionsKeyBytes; // raw bytes from options.updateDiskCacheKey
public final Key engineKey; // optional - in-memory only
public StoredKeys(
Key sourceKey,
Key signature,
int width,
int height,
Transformation<?> transformation,
byte[] transformationKeyBytes,
Class<?> decodedResourceClass,
Options options,
byte[] optionsKeyBytes,
Key engineKey) {
this.sourceKey = sourceKey;
this.signature = signature;
this.width = width;
this.height = height;
this.transformation = transformation;
this.transformationKeyBytes = transformationKeyBytes;
this.decodedResourceClass = decodedResourceClass;
this.options = options;
this.optionsKeyBytes = optionsKeyBytes;
this.engineKey = engineKey;
}
}
private final Map<String, StoredKeys> map = new ConcurrentHashMap<>();
public void put(String id, StoredKeys keys) {
map.put(id, keys);
}
public StoredKeys get(String id) {
return map.get(id);
}
public void remove(String id) {
map.remove(id);
}
}
package com.bumptech.glide.load.engine;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.Transformation;
import java.util.Map;
import android.util.Log;
/**
* Public subclass of package-private EngineKeyFactory that notifies a listener
* when an
* EngineKey is created.
*/
public class CapturingEngineKeyFactory extends EngineKeyFactory {
public interface Listener {
void onEngineKeyCreated(Key engineKey, Object model);
}
private final Listener listener;
public CapturingEngineKeyFactory(Listener listener) {
this.listener = listener;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
com.bumptech.glide.load.engine.EngineKey buildKey(
Object model,
Key signature,
int width,
int height,
Map<Class<?>, Transformation<?>> transformations,
Class<?> resourceClass,
Class<?> transcodeClass,
Options options) {
com.bumptech.glide.load.engine.EngineKey engineKey = super.buildKey(model, signature, width, height,
transformations, resourceClass, transcodeClass, options);
if (listener != null) {
listener.onEngineKeyCreated(engineKey, model);
}
return engineKey;
}
}
package com.nativescript.image;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.load.engine.GlideException;
import java.util.Arrays;
import java.util.List;
/**
* Delegate multiple RequestListener instances via a single listener attach point.
*
* Usage:
* requestBuilder.listener(new CompositeRequestListener<>(saveKeysListener, otherListener));
*
* Behavior:
* - Calls each delegate listener in order.
* - If any delegate returns true, the composite returns true (short-circuit semantics for Glide).
* - Exceptions from delegates are caught and logged so one bad listener doesn't break the others.
*/
public final class CompositeRequestListener<T> implements RequestListener<T> {
private final List<RequestListener<T>> delegates;
@SafeVarargs
public CompositeRequestListener(@NonNull RequestListener<T>... listeners) {
this.delegates = Arrays.asList(listeners);
}
@Override
public boolean onLoadFailed(GlideException e, Object model, Target<T> target, boolean isFirstResource) {
boolean handled = false;
for (RequestListener<T> l : delegates) {
if (l == null) continue;
try {
handled |= l.onLoadFailed(e, model, target, isFirstResource);
} catch (Throwable t) {
// swallow/log so one faulty listener doesn't break everything
t.printStackTrace();
}
}
return handled;
}
@Override
public boolean onResourceReady(T resource, Object model, Target<T> target, DataSource dataSource, boolean isFirstResource) {
boolean handled = false;
for (RequestListener<T> l : delegates) {
if (l == null) continue;
try {
handled |= l.onResourceReady(resource, model, target, dataSource, isFirstResource);
} catch (Throwable t) {
t.printStackTrace();
}
}
return handled;
}
}
package com.nativescript.image;
import android.graphics.drawable.Drawable;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.request.transition.DrawableCrossFadeFactory;
import com.bumptech.glide.request.transition.NoTransition;
import com.bumptech.glide.request.transition.Transition;
import android.util.Log;
/**
* Delegates to the parent cross-fade behaviour but only returns a cross-fade
* transition for REMOTE loads when `onlyOnNetwork` is true; otherwise returns NoTransition.
*/
public class ConditionalCrossFadeFactory extends DrawableCrossFadeFactory {
private final boolean onlyOnNetwork;
public ConditionalCrossFadeFactory(int durationMs, boolean onlyOnNetwork) {
// Call the base class constructor which requires (durationMs, crossFadeEnabled)
super(durationMs, true);
this.onlyOnNetwork = onlyOnNetwork;
}
@NonNull
@Override
public Transition<Drawable> build(DataSource dataSource, boolean isFirstResource) {
if (this.onlyOnNetwork && dataSource != DataSource.REMOTE) {
return NoTransition.get();
}
return super.build(DataSource.REMOTE, isFirstResource);
}
}
package com.nativescript.image;
import androidx.annotation.NonNull;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.data.DataFetcher;
import okhttp3.Call;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.ResponseBody;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import android.util.Log;
public class CustomDataFetcher implements DataFetcher<InputStream> {
private final Call.Factory client;
private final CustomGlideUrl url;
private InputStream stream;
private ResponseBody responseBody;
private Call call;
public CustomDataFetcher(Call.Factory client, CustomGlideUrl url) {
this.client = client;
this.url = url;
}
@Override
public void loadData(@NonNull Priority priority, @NonNull DataCallback<? super InputStream> callback) {
// Build request with headers
Request.Builder requestBuilder = new Request.Builder().url(url.toStringUrl());
for (Map.Entry<String, String> entry : url.getHeaders().entrySet()) {
requestBuilder.addHeader(entry.getKey(), entry.getValue());
}
Request request = requestBuilder.build();
// Create client with interceptors if needed
Call.Factory effectiveClient = client;
if (url.hasProgressListener() || url.hasLoadSourceListener()) {
OkHttpClient.Builder clientBuilder;
if (client instanceof OkHttpClient) {
clientBuilder = ((OkHttpClient) client).newBuilder();
} else {
clientBuilder = new OkHttpClient.Builder();
}
// Add load source interceptor first (before request)
if (url.hasLoadSourceListener()) {
clientBuilder.addInterceptor(
new LoadSourceInterceptor(url.toStringUrl(), url.getLoadSourceCallback()));
}
// Add progress interceptor (wraps response body)
if (url.hasProgressListener()) {
clientBuilder.addNetworkInterceptor(
new ProgressInterceptor(url.toStringUrl(), url.getProgressCallback()));
}
effectiveClient = clientBuilder.build();
}
call = effectiveClient.newCall(request);
try {
Response response = call.execute();
// Check response using public methods
if (!response.isSuccessful()) {
callback.onLoadFailed(new IOException("HTTP error: " + response.code()));
return;
}
responseBody = response.body();
if (responseBody == null) {
callback.onLoadFailed(new IOException("Received null response body"));
return;
}
stream = responseBody.byteStream();
callback.onDataReady(stream);
} catch (IOException e) {
callback.onLoadFailed(e);
}
}
@Override
public void cleanup() {
try {
if (stream != null) {
stream.close();
}
} catch (IOException e) {
// Ignore
}
if (responseBody != null) {
responseBody.close();
}
}
@Override
public void cancel() {
if (call != null) {
call.cancel();
}
}
@NonNull
@Override
public Class<InputStream> getDataClass() {
return InputStream.class;
}
@NonNull
@Override
public DataSource getDataSource() {
return DataSource.REMOTE;
}
}
package com.nativescript.image;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.Registry;
import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.engine.cache.MemorySizeCalculator;
import com.bumptech.glide.load.engine.cache.DiskCache;
import com.bumptech.glide.load.engine.cache.DiskLruCacheWrapper;
import com.bumptech.glide.load.engine.cache.MemoryCache;
import com.bumptech.glide.load.engine.cache.LruResourceCache;
import com.bumptech.glide.load.engine.CapturingEngineKeyFactory;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.module.AppGlideModule;
import com.bumptech.glide.RequestBuilder;
import com.bumptech.glide.signature.ObjectKey;
import okhttp3.OkHttpClient;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
@GlideModule
public class CustomGlideModule extends AppGlideModule {
private static final String TAG = "MyAppGlideModule";
private static final String INJECT_TAG = "EngineKeyFactoryInject";
@Override
public void applyOptions(@NonNull Context context, @NonNull GlideBuilder builder) {
// Use our custom memory cache wrapper
MemorySizeCalculator calculator = new MemorySizeCalculator.Builder(context)
.setMemoryCacheScreens(2)
.build();
LruResourceCache memoryCache = new LruResourceCache(calculator.getMemoryCacheSize());
EvictionManager.get().setMemoryCache(memoryCache);
builder.setMemoryCache(memoryCache);
// Set a disk cache factory that also registers the disk cache instance with
// EvictionManager.
builder.setDiskCache(new DiskCache.Factory() {
@Override
public DiskCache build() {
DiskCache dc = DiskLruCacheWrapper.create(context.getCacheDir(), 250 * 1024 * 1024);
EvictionManager.get().setDiskCache(dc);
return dc;
}
});
}
@Override
public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
// Create base OkHttp client
OkHttpClient client = new OkHttpClient.Builder().build();
// SINGLE LOADER: CustomUrlLoader handles both CustomGlideUrl and GlideUrl
// This replaces both the old CustomUrlLoader and UrlTrackingModelLoader
registry.replace(
GlideUrl.class,
InputStream.class,
new CustomUrlLoader.Factory(client));
// Listener: called when an EngineKey is created. Update the stored keys to
// include engineKey.
CapturingEngineKeyFactory.Listener listener = (engineKey, model) -> {
// Log.i("JS", "CapturingEngineKeyFactory.Listener 1" + engineKey + " " + model);
if (model == null)
return;
String id = String.valueOf(model);
// Read either persistent or in-memory stored keys
CacheKeyStore.StoredKeys s = EvictionManager.get().getKeyStore().get(id);
if (s == null) {
// if key store exists but no entry, create minimal
s = new CacheKeyStore.StoredKeys(
new com.bumptech.glide.signature.ObjectKey(id),
new com.bumptech.glide.signature.ObjectKey("signature-none"),
com.bumptech.glide.request.target.Target.SIZE_ORIGINAL,
com.bumptech.glide.request.target.Target.SIZE_ORIGINAL,
null,
null,
android.graphics.Bitmap.class,
new Options(),
null,
null);
}
// Build an updated StoredKeys that preserves everything and sets engineKey
CacheKeyStore.StoredKeys updated = new CacheKeyStore.StoredKeys(
s.sourceKey,
s.signature,
s.width,
s.height,
s.transformation, // may be null; preserved for in-process fallback
s.transformationKeyBytes, // raw bytes if recorded (preferred)
s.decodedResourceClass,
s.options,
s.optionsKeyBytes,
engineKey // set the captured engineKey
);
// Put updated entry into the in-memory store so later EvictionManager can
// remove memory entry.
EvictionManager.get().getKeyStore().put(id, updated);
};
// Create the capturing factory
// instantiate the capturing factory (public class in
// com.bumptech.glide.load.engine)
Object capturingFactory = new com.bumptech.glide.load.engine.CapturingEngineKeyFactory(listener);
// inject it into Glide's Engine reflectively, passing it as Object (no
// EngineKeyFactory compile-time ref)
try {
injectEngineKeyFactoryIntoGlide(glide, capturingFactory);
Log.i(TAG, "Injected capturing EngineKeyFactory into Glide engine");
} catch (Exception e) {
Log.w(TAG, "Failed to inject capturing EngineKeyFactory", e);
}
}
/**
* Reflectively find Glide.engine and replace its EngineKeyFactory-typed field
* with capturingFactory.
* This tries to be resilient across minor Glide 5.x binary differences.
*/
private void injectEngineKeyFactoryIntoGlide(Object glideInstance, Object capturingFactory) throws Exception {
if (glideInstance == null) {
throw new IllegalArgumentException("glideInstance == null");
}
// 1) find Engine field on Glide
Field engineField = null;
for (Field f : glideInstance.getClass().getDeclaredFields()) {
if (f.getType().getName().contains("Engine")) {
engineField = f;
break;
}
}
if (engineField == null) {
throw new NoSuchFieldException("Could not find Engine field on Glide");
}
engineField.setAccessible(true);
Object engineInstance = engineField.get(glideInstance);
if (engineInstance == null) {
throw new IllegalStateException("Glide.engine is null");
}
// 2) find the keyFactory-like field on Engine
Field targetField = null;
Class<?> engineClass = engineInstance.getClass();
Class<?> cur = engineClass;
while (cur != null && targetField == null) {
for (Field f : cur.getDeclaredFields()) {
String typeName = f.getType().getName();
if (typeName.contains("EngineKeyFactory") || typeName.endsWith("EngineKeyFactory")
|| f.getName().toLowerCase().contains("keyfactory")) {
targetField = f;
break;
}
}
cur = cur.getSuperclass();
}
if (targetField == null) {
throw new NoSuchFieldException(
"Could not find EngineKeyFactory-like field in Engine class: " + engineClass.getName());
}
targetField.setAccessible(true);
// Log current value
Object before = targetField.get(engineInstance);
int beforeHash = System.identityHashCode(before);
String beforeClass = (before == null) ? "null" : before.getClass().getName();
// If field is final, try to remove final modifier so setting works reliably
try {
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
int mods = targetField.getModifiers();
if (Modifier.isFinal(mods)) {
modifiersField.setInt(targetField, mods & ~Modifier.FINAL);
}
} catch (NoSuchFieldException nsf) {
// Android ART may not expose 'modifiers' the same way; ignore if not available
Log.i(INJECT_TAG, "Could not access Field.modifiers to clear final; continuing");
} catch (Throwable t) {
Log.w(INJECT_TAG, "Failed to clear final modifier (continuing attempt to set field)", t);
}
// 3) set the new factory instance
try {
targetField.set(engineInstance, capturingFactory);
} catch (IllegalAccessException | IllegalArgumentException iae) {
// Log and rethrow so caller can inspect
Log.w(INJECT_TAG, "targetField.set(...) failed", iae);
throw iae;
}
// 4) read back and log to verify
Object after = targetField.get(engineInstance);
int afterHash = System.identityHashCode(after);
String afterClass = (after == null) ? "null" : after.getClass().getName();
// quick verification: are they the same instance we tried to set?
boolean sameInstance = (after == capturingFactory);
if (!sameInstance) {
throw new IllegalStateException(
"Injection did not set the expected capturingFactory instance. afterClass=" + afterClass);
}
}
@Override
public boolean isManifestParsingEnabled() {
return false;
}
}
package com.nativescript.image;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.load.model.LazyHeaders;
import java.util.Map;
/**
* Custom GlideUrl with progress and load source callbacks.
* Headers are automatically included in cache key by Glide's LazyHeaders.
*/
public class CustomGlideUrl extends GlideUrl {
private final ImageProgressCallback progressCallback;
private final ImageLoadSourceCallback loadSourceCallback;
public CustomGlideUrl(String url,
Map<String, String> headers,
ImageProgressCallback progressCallback,
ImageLoadSourceCallback loadSourceCallback) {
// Use LazyHeaders.Builder - Glide automatically includes these in cache key!
super(url, buildLazyHeaders(headers));
this.progressCallback = progressCallback;
this.loadSourceCallback = loadSourceCallback;
}
private static LazyHeaders buildLazyHeaders(Map<String, String> headers) {
LazyHeaders.Builder builder = new LazyHeaders.Builder();
if (headers != null) {
for (Map.Entry<String, String> entry : headers.entrySet()) {
builder.addHeader(entry.getKey(), entry.getValue());
}
}
return builder.build();
}
public ImageProgressCallback getProgressCallback() {
return progressCallback;
}
public ImageLoadSourceCallback getLoadSourceCallback() {
return loadSourceCallback;
}
public boolean hasProgressListener() {
return progressCallback != null;
}
public boolean hasLoadSourceListener() {
return loadSourceCallback != null;
}
}
package com.nativescript.image;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.data.DataFetcher;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.load.model.ModelLoader;
import com.bumptech.glide.load.model.ModelLoaderFactory;
import com.bumptech.glide.load.model.MultiModelLoaderFactory;
import okhttp3.Call;
import okhttp3.OkHttpClient;
import java.io.InputStream;
import android.util.Log;
/**
* Unified ModelLoader that handles both CustomGlideUrl and standard GlideUrl.
* This eliminates the need for UrlTrackingModelLoader.
*/
public class CustomUrlLoader implements ModelLoader<GlideUrl, InputStream> {
private final Call.Factory client;
public CustomUrlLoader(Call.Factory client) {
this.client = client;
}
@Nullable
@Override
public LoadData<InputStream> buildLoadData(
@NonNull GlideUrl model,
int width,
int height,
@NonNull Options options) {
// Create the appropriate data fetcher
DataFetcher<InputStream> fetcher;
if (model instanceof CustomGlideUrl) {
// Use CustomDataFetcher for CustomGlideUrl (supports progress/load source)
fetcher = new CustomDataFetcher(client, (CustomGlideUrl) model);
} else {
// Use standard OkHttp fetcher for regular GlideUrl
fetcher = new com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher(
client,
model);
}
return new LoadData<>(model, fetcher);
}
@Override
public boolean handles(@NonNull GlideUrl model) {
// Handles both CustomGlideUrl and standard GlideUrl
return true;
}
public static class Factory implements ModelLoaderFactory<GlideUrl, InputStream> {
private final OkHttpClient client;
public Factory(OkHttpClient client) {
this.client = client;
}
@NonNull
@Override
public ModelLoader<GlideUrl, InputStream> build(MultiModelLoaderFactory multiFactory) {
return new CustomUrlLoader(client);
}
@Override
public void teardown() {
}
}
}
package com.nativescript.image;
import android.os.Handler;
import android.os.Looper;
import androidx.annotation.GuardedBy;
import androidx.annotation.MainThread;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.load.engine.cache.DiskCache;
import com.bumptech.glide.load.engine.cache.MemoryCache;
import com.bumptech.glide.load.engine.cache.LruResourceCache;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import android.util.Log;
/**
* EvictionManager (updated)
*
* - adds clearDiskCache/clearMemory/clearAll with callback overloads
* - adds disk-only / memory-only evict methods
* - uses recorded transformation/options key bytes to recreate transformed
* cache keys
* - EvictionCallback now reports an optional Exception (first encountered) in
* addition to success flag
*
* Notes:
* - Disk operations run on a background executor.
* - Memory ops run on the main thread.
* - Callbacks are always posted on the main thread.
*/
public final class EvictionManager {
private static final String TAG = "EvictionManager";
private static final EvictionManager INSTANCE = new EvictionManager();
private final ExecutorService diskExecutor = Executors.newSingleThreadExecutor();
private final Handler mainHandler = new Handler(Looper.getMainLooper());
@GuardedBy("this")
private DiskCache diskCache;
@GuardedBy("this")
private LruResourceCache memoryCache;
// in-memory store for captured info and engineKey object
private final CacheKeyStore inMemoryKeyStore = new CacheKeyStore();
// optional persistent store (SharedPref). If null, fallback to in-memory only.
@Nullable
private SharedPrefCacheKeyStore persistentStore;
private EvictionManager() {
}
public static EvictionManager get() {
return INSTANCE;
}
public synchronized void setDiskCache(DiskCache diskCache) {
this.diskCache = diskCache;
}
public synchronized void setMemoryCache(LruResourceCache memoryCache) {
this.memoryCache = memoryCache;
}
public synchronized void setPersistentStore(@Nullable SharedPrefCacheKeyStore store) {
this.persistentStore = store;
}
/**
* Expose the in-memory store so callers/listeners can put engineKey objects
* there.
*/
public CacheKeyStore getKeyStore() {
return inMemoryKeyStore;
}
/**
* Save keys (mirrors into persistent store if configured).
*/
public synchronized void saveKeys(final String id, final CacheKeyStore.StoredKeys newStored) {
if (id == null || newStored == null) {
Log.w(TAG, "saveKeys called with null id or newStored");
return;
}
try {
// 1) Load existing stored keys (check persistent store first, fallback to
// in-memory)
CacheKeyStore.StoredKeys existing = null;
if (persistentStore != null) {
existing = persistentStore.get(id);
}
if (existing == null) {
existing = inMemoryKeyStore.get(id);
}
// 2) If existing has an engineKey and newStored doesn't, merge the engineKey in
CacheKeyStore.StoredKeys toPersist = newStored;
if (existing != null && existing.engineKey != null && toPersist.engineKey == null) {
// create a new StoredKeys that is identical to newStored but keeps
// existing.engineKey
toPersist = new CacheKeyStore.StoredKeys(
toPersist.sourceKey,
toPersist.signature,
toPersist.width,
toPersist.height,
toPersist.transformation,
toPersist.transformationKeyBytes,
toPersist.decodedResourceClass,
toPersist.options,
toPersist.optionsKeyBytes,
existing.engineKey // preserve captured engine key
);
}
// 3) Persist to persistent store if available, else to in-memory store
if (persistentStore != null) {
persistentStore.put(id, toPersist);
} else {
inMemoryKeyStore.put(id, toPersist);
}
} catch (Throwable t) {
Log.w(TAG, "saveKeys failed for id=" + id, t);
}
}
/**
* Eviction completion callback (always invoked on main thread).
*
* The second argument is the first Exception encountered during the operation
* (if any).
*/
public interface EvictionCallback {
void onComplete(boolean success, @Nullable Exception error);
}
/** Disk presence callback for async check. */
public interface DiskPresenceCallback {
void onResult(boolean sourcePresent, boolean transformedPresent);
}
// -----------------------
// New: clear APIs
// -----------------------
/**
* Clear the entire disk cache. Runs on a background thread. Callback invoked on
* main thread.
*/
public void clearDiskCache(@Nullable final EvictionCallback callback) {
diskExecutor.execute(() -> {
boolean success = true;
Exception ex = null;
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
dc.clear();
} catch (Exception e) {
success = false;
ex = e;
}
}
if (callback != null) {
final boolean finalSuccess = success;
final Exception finalEx = ex;
mainHandler.post(() -> callback.onComplete(finalSuccess, finalEx));
}
});
}
/** Clear disk cache without callback. */
public void clearDiskCache() {
clearDiskCache(null);
}
/**
* Clear the entire memory cache. This must be invoked on the main thread (we
* post to main to
* guarantee it). Callback invoked on main thread.
*/
public void clearMemory(@Nullable final EvictionCallback callback) {
mainHandler.post(() -> {
boolean success = true;
Exception ex = null;
LruResourceCache mc;
synchronized (EvictionManager.this) {
mc = memoryCache;
}
if (mc != null) {
try {
mc.clearMemory();
} catch (Exception e) {
success = false;
ex = e;
}
}
if (callback != null) {
callback.onComplete(success, ex);
}
});
}
/** Clear memory cache without callback. */
public void clearMemory() {
clearMemory(null);
}
/**
* Clear both disk and memory caches. Disk clear runs first on background
* executor; when disk clear
* finishes we clear memory on the main thread. Callback invoked on main with
* combined success and
* the first exception encountered (if any).
*/
public void clearAll(@Nullable final EvictionCallback callback) {
diskExecutor.execute(() -> {
boolean diskSuccess = true;
Exception firstEx = null;
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
dc.clear();
} catch (Exception e) {
diskSuccess = false;
firstEx = e;
}
}
final boolean finalDiskSuccess = diskSuccess;
final Exception finalFirstEx = firstEx;
mainHandler.post(() -> {
boolean memSuccess = true;
Exception memEx = null;
LruResourceCache mc;
synchronized (EvictionManager.this) {
mc = memoryCache;
}
if (mc != null) {
try {
mc.clearMemory();
} catch (Exception e) {
memSuccess = false;
if (finalFirstEx == null)
memEx = e;
}
}
boolean combined = finalDiskSuccess && memSuccess;
Exception combinedEx = finalFirstEx != null ? finalFirstEx : memEx;
if (callback != null)
callback.onComplete(combined, combinedEx);
});
});
}
/** Clear both disk and memory without callback. */
public void clearAll() {
clearAll(null);
}
// -----------------------
// Eviction-by-id APIs
// -----------------------
/**
* Evict both disk (source + transformed) and memory for id. Callback invoked on
* main thread.
*/
public void evictAllForId(final String id, @Nullable final EvictionCallback callback) {
final CacheKeyStore.StoredKeys s = readStoredKeysPreferPersistent(id);
if (s == null) {
// fallback conservative attempt (source only)
evictDiskForId(id, callback);
return;
}
final byte[] transformationBytes = getTransformationBytesFromStoredKeys(s);
final byte[] optionsBytes = s.optionsKeyBytes;
performEvictionTasks(
s.sourceKey,
s.signature,
s.width,
s.height,
transformationBytes,
s.decodedResourceClass,
optionsBytes,
s.engineKey,
callback);
}
/** Backwards-compatible no-callback variant */
public void evictAllForId(final String id) {
evictAllForId(id, null);
}
/**
* Evict from disk (source + transformed). Callback invoked on main thread.
*/
public void evictDiskForId(final String id, @Nullable final EvictionCallback callback) {
final CacheKeyStore.StoredKeys s = readStoredKeysPreferPersistent(id);
if (s == null) {
// fallback to deleting source by id-only ObjectKey
final Key fallbackSource = new com.bumptech.glide.signature.ObjectKey(id);
diskExecutor.execute(() -> {
boolean success = true;
Exception ex = null;
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
dc.delete(fallbackSource);
} catch (Exception e) {
success = false;
ex = e;
}
}
if (callback != null) {
final boolean finalSuccess = success;
final Exception finalEx = ex;
mainHandler.post(() -> callback.onComplete(finalSuccess, finalEx));
}
});
return;
}
diskExecutor.execute(() -> {
boolean success = true;
Exception ex = null;
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
dc.delete(s.sourceKey);
} catch (Exception e) {
success = false;
ex = e;
}
try {
Key resourceKey = new RecreatedResourceKey(
s.sourceKey,
s.signature,
s.width,
s.height,
getTransformationBytesFromStoredKeys(s),
s.decodedResourceClass,
s.optionsKeyBytes);
dc.delete(resourceKey);
} catch (Exception e) {
if (ex == null)
ex = e;
success = false;
}
}
if (callback != null) {
final boolean finalSuccess = success;
final Exception finalEx = ex;
mainHandler.post(() -> callback.onComplete(finalSuccess, finalEx));
}
});
}
/** Evict disk-only, no callback. */
public void evictDiskForId(final String id) {
evictDiskForId(id, null);
}
/** Evict only source/raw bytes (disk). */
public void evictSourceForId(final String id, @Nullable final EvictionCallback callback) {
final CacheKeyStore.StoredKeys s = readStoredKeysPreferPersistent(id);
final Key sourceKey = (s != null && s.sourceKey != null) ? s.sourceKey
: new com.bumptech.glide.signature.ObjectKey(id);
diskExecutor.execute(() -> {
boolean success = true;
Exception ex = null;
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
dc.delete(sourceKey);
} catch (Exception e) {
success = false;
ex = e;
}
}
if (callback != null) {
final boolean finalSuccess = success;
final Exception finalEx = ex;
mainHandler.post(() -> callback.onComplete(finalSuccess, finalEx));
}
});
}
/** Evict only the transformed resource (disk). */
public void evictTransformedForId(final String id, @Nullable final EvictionCallback callback) {
final CacheKeyStore.StoredKeys s = readStoredKeysPreferPersistent(id);
if (s == null) {
if (callback != null)
mainHandler.post(() -> callback.onComplete(false, null));
return;
}
final byte[] transformationBytes = getTransformationBytesFromStoredKeys(s);
final byte[] optionsBytes = s.optionsKeyBytes;
diskExecutor.execute(() -> {
boolean success = true;
Exception ex = null;
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
Key resourceKey = new RecreatedResourceKey(s.sourceKey, s.signature, s.width, s.height, transformationBytes,
s.decodedResourceClass, optionsBytes);
dc.delete(resourceKey);
} catch (Exception e) {
success = false;
ex = e;
}
}
if (callback != null) {
final boolean finalSuccess = success;
final Exception finalEx = ex;
mainHandler.post(() -> callback.onComplete(finalSuccess, finalEx));
}
});
}
/**
* Evict only from memory (must be called on main thread). Callback invoked on
* main thread.
*/
@MainThread
public void evictMemoryForId(final String id, @Nullable final EvictionCallback callback) {
final CacheKeyStore.StoredKeys s = (persistentStore != null) ? persistentStore.get(id) : inMemoryKeyStore.get(id);
final Key engineKey = (s != null) ? s.engineKey : null;
boolean success = true;
Exception ex = null;
if (engineKey == null) {
if (callback != null)
callback.onComplete(false, null);
return;
}
LruResourceCache mc;
synchronized (this) {
mc = memoryCache;
}
if (mc == null) {
if (callback != null)
callback.onComplete(false, null);
return;
}
try {
mc.remove(engineKey);
} catch (Exception e) {
success = false;
ex = e;
}
if (callback != null)
callback.onComplete(success, ex);
}
/**
* Best-effort synchronous check whether the given id is currently present in
* the memory cache.
*
* - Returns true if present.
* - Returns false if not present or if we cannot determine (no suitable method
* on MemoryCache).
*
* Notes:
* - This uses a reflective 'contains(Key)' check if available on your
* MemoryCache implementation,
* else tries a reflective 'get(Key)' as a fallback. If neither exists we cannot
* reliably check
* without evicting; so we return false.
*
* - Call this on the main thread.
*/
@MainThread
public boolean isInMemoryCache(final String id) {
final CacheKeyStore.StoredKeys s = (persistentStore != null) ? persistentStore.get(id) : inMemoryKeyStore.get(id);
if (s == null || s.engineKey == null)
return false;
final Key engineKey = s.engineKey;
LruResourceCache mc;
synchronized (this) {
mc = memoryCache;
}
if (mc == null)
return false;
return mc.contains(engineKey);
}
/**
* Async disk presence check. Runs on background thread; callback invoked on
* main thread with two booleans:
* onResult(sourcePresent, transformedPresent)
*/
public void isInDiskCacheAsync(final String id, final DiskPresenceCallback callback) {
diskExecutor.execute(() -> {
boolean sourcePresent = false;
boolean transformedPresent = false;
final CacheKeyStore.StoredKeys s = (persistentStore != null) ? persistentStore.get(id) : inMemoryKeyStore.get(id);
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc == null) {
mainHandler.post(() -> callback.onResult(false, false));
return;
}
try {
if (s != null && s.sourceKey != null) {
sourcePresent = dc.get(s.sourceKey) != null;
byte[] transformationBytes = getTransformationBytesFromStoredKeys(s);
Key resourceKey = new RecreatedResourceKey(s.sourceKey, s.signature, s.width, s.height, transformationBytes,
s.decodedResourceClass, s.optionsKeyBytes);
transformedPresent = dc.get(resourceKey) != null;
} else {
// fallback: check ObjectKey(id) as source
Key fallback = new com.bumptech.glide.signature.ObjectKey(id);
sourcePresent = dc.get(fallback) != null;
}
} catch (Exception ignored) {
}
final boolean finalSource = sourcePresent;
final boolean finalTransformed = transformedPresent;
mainHandler.post(() -> callback.onResult(finalSource, finalTransformed));
});
}
/**
* Blocking disk presence check (dangerous on main thread). Call from background
* only.
* Returns array [sourcePresent, transformedPresent].
*/
public boolean[] isInDiskCacheBlocking(final String id) {
final CacheKeyStore.StoredKeys s = (persistentStore != null) ? persistentStore.get(id) : inMemoryKeyStore.get(id);
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
boolean sourcePresent = false;
boolean transformedPresent = false;
if (dc == null)
return new boolean[] { false, false };
try {
if (s != null && s.sourceKey != null) {
sourcePresent = dc.get(s.sourceKey) != null;
Key resourceKey = new RecreatedResourceKey(s.sourceKey, s.signature, s.width, s.height,
getTransformationBytesFromStoredKeys(s), s.decodedResourceClass, s.optionsKeyBytes);
transformedPresent = dc.get(resourceKey) != null;
} else {
Key fallback = new com.bumptech.glide.signature.ObjectKey(id);
sourcePresent = dc.get(fallback) != null;
}
} catch (Exception ignored) {
}
return new boolean[] { sourcePresent, transformedPresent };
}
/**
* Helper used by the eviction methods to coordinate deletes + memory removal.
*/
private void performEvictionTasks(
final Key sourceKey,
final Key signature,
final int width,
final int height,
final byte[] transformationKeyBytes,
final Class<?> decodedResourceClass,
final byte[] optionsKeyBytes,
final Key engineKey,
@Nullable final EvictionCallback callback) {
int tasks = 0;
if (sourceKey != null)
tasks++;
if (signature != null && sourceKey != null)
tasks++;
if (tasks == 0) {
// only memory removal possible
if (engineKey != null) {
mainHandler.post(() -> {
MemoryCache mc;
synchronized (EvictionManager.this) {
mc = memoryCache;
}
if (mc != null) {
try {
mc.remove(engineKey);
} catch (Exception ignored) {
}
}
if (callback != null)
callback.onComplete(true, null);
});
} else {
if (callback != null)
mainHandler.post(() -> callback.onComplete(true, null));
}
return;
}
final AtomicInteger remaining = new AtomicInteger(tasks);
final AtomicBoolean failed = new AtomicBoolean(false);
final AtomicReference<Exception> firstException = new AtomicReference<>(null);
// delete source bytes
if (sourceKey != null) {
diskExecutor.execute(() -> {
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
dc.delete(sourceKey);
} catch (Exception e) {
failed.set(true);
firstException.compareAndSet(null, e);
}
}
if (remaining.decrementAndGet() == 0) {
mainHandler.post(() -> {
if (engineKey != null) {
MemoryCache mc;
synchronized (EvictionManager.this) {
mc = memoryCache;
}
if (mc != null) {
try {
mc.remove(engineKey);
} catch (Exception ignored) {
}
}
}
if (callback != null)
callback.onComplete(!failed.get(), firstException.get());
});
}
});
}
// delete transformed resource
if (signature != null && sourceKey != null) {
diskExecutor.execute(() -> {
DiskCache dc;
synchronized (EvictionManager.this) {
dc = diskCache;
}
if (dc != null) {
try {
Key resourceKey = new RecreatedResourceKey(sourceKey, signature, width, height, transformationKeyBytes,
decodedResourceClass, optionsKeyBytes);
dc.delete(resourceKey);
} catch (Exception e) {
failed.set(true);
firstException.compareAndSet(null, e);
}
}
if (remaining.decrementAndGet() == 0) {
mainHandler.post(() -> {
if (engineKey != null) {
MemoryCache mc;
synchronized (EvictionManager.this) {
mc = memoryCache;
}
if (mc != null) {
try {
mc.remove(engineKey);
} catch (Exception ignored) {
}
}
}
if (callback != null)
callback.onComplete(!failed.get(), firstException.get());
});
}
});
}
}
@Nullable
private CacheKeyStore.StoredKeys readStoredKeysPreferPersistent(String id) {
if (persistentStore != null) {
CacheKeyStore.StoredKeys s = persistentStore.get(id);
if (s != null) {
// keep mirrored in-memory copy for engineKey augmentation
inMemoryKeyStore.put(id, s);
return s;
}
}
return inMemoryKeyStore.get(id);
}
@Nullable
private static byte[] getTransformationBytesFromStoredKeys(CacheKeyStore.StoredKeys s) {
if (s == null)
return null;
if (s.transformationKeyBytes != null)
return s.transformationKeyBytes;
if (s.transformation != null) {
try {
RecordingDigest rd = new RecordingDigest();
s.transformation.updateDiskCacheKey(rd);
return rd.digest();
} catch (Exception ignored) {
}
}
return null;
}
}
package com.nativescript.image;
import android.util.Log;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.request.RequestOptions;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
/**
* Utility to extract com.bumptech.glide.load.Options from a RequestOptions
* instance via reflection.
*
* Behavior:
* - Try public RequestOptions.getOptions() if present (cached).
* - Otherwise try to find a private 'options' field on RequestOptions or its
* superclasses (cached).
* - If neither is found, return new Options() and log a single warning
* (subsequent calls won't re-log lookup failures).
*
* Notes:
* - Reflection is fragile across Glide versions and with R8/ProGuard. This
* class logs failures and falls back safely.
*/
public final class ExtractRequestOptions {
private static final String TAG = "ExtractRequestOptions";
// Cached reflective handles and lookup state
private static volatile Method cachedGetOptionsMethod;
private static volatile Field cachedOptionsField;
private static volatile boolean triedMethodLookup = false;
private static volatile boolean triedFieldLookup = false;
private ExtractRequestOptions() {
}
/**
* Extracts the internal Options from a RequestOptions instance.
* This method is fast after the first call because it caches reflective
* handles.
*/
public static Options getFrom(RequestOptions requestOptions) {
if (requestOptions == null) {
return new Options();
}
// 2) Try cached field lookup if method didn't yield a result
Field f = cachedOptionsField;
if (f == null && !triedFieldLookup) {
synchronized (ExtractRequestOptions.class) {
if (!triedFieldLookup) {
triedFieldLookup = true;
Class<?> cls = requestOptions.getClass();
while (cls != null && cls != Object.class) {
try {
Field optionsField = cls.getDeclaredField("options");
if (optionsField != null) {
optionsField.setAccessible(true);
cachedOptionsField = optionsField;
f = optionsField;
break;
}
} catch (NoSuchFieldException nsf) {
// try superclass
cls = cls.getSuperclass();
} catch (Throwable t) {
Log.w(TAG, "Failed to access 'options' field via reflection", t);
break;
}
}
if (f == null) {
Log.w(TAG, "Could not find 'options' field on RequestOptions (will fall back to new Options()).");
}
} else {
f = cachedOptionsField;
}
}
}
if (f != null) {
try {
Object value = f.get(requestOptions);
if (value instanceof Options) {
return (Options) value;
} else {
Log.w(TAG, "Found 'options' field but it's not an Options instance: "
+ (value == null ? "null" : value.getClass().getName()));
}
} catch (Throwable t) {
Log.w(TAG, "Reading cached 'options' field failed; falling back to new Options()", t);
}
}
// 3) Final fallback: return new Options() and warn (only logged during the
// first failed lookups)
return new Options();
}
/**
* Optional: clear cached reflective handles. Useful for tests or if you load
* different Glide versions at runtime.
*/
public static void clearCache() {
synchronized (ExtractRequestOptions.class) {
cachedGetOptionsMethod = null;
cachedOptionsField = null;
triedMethodLookup = false;
triedFieldLookup = false;
}
}
}
package com.nativescript.image;
public interface ImageLoadSourceCallback {
void onLoadStarted(String url, String source); // "network"
}
package com.nativescript.image;
public interface ImageProgressCallback {
void onProgress(String url, long bytesRead, long totalBytes);
}
package com.nativescript.image;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Response;
public class LoadSourceInterceptor implements Interceptor {
private final String url;
private final ImageLoadSourceCallback callback;
private boolean notified = false;
public LoadSourceInterceptor(String url, ImageLoadSourceCallback callback) {
this.url = url;
this.callback = callback;
}
@Override
public Response intercept(Chain chain) throws IOException {
// Notify that network load is starting BEFORE making the request
if (!notified && callback != null) {
callback.onLoadStarted(url, "network");
notified = true;
}
// Proceed with the request
return chain.proceed(chain.request());
}
}
package com.nativescript.image;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Outline;
import android.graphics.Rect;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/**
* Drawable wrapper that applies a Matrix before drawing the wrapped drawable
* and
* properly forwards drawable callbacks so animated drawables work.
*
* Behavior:
* - The wrapped drawable is kept in drawable-local coords: bounds
* (0,0,intrinsicW,intrinsicH).
* - setMatrix(matrix) expects a matrix mapping drawable-local coords -> view
* coords.
* - We implement Drawable.Callback methods
* (invalidateDrawable/scheduleDrawable/unscheduleDrawable)
* so the wrapped drawable can drive invalidation/scheduling through this
* wrapper.
*
* Notes:
* - Drawable.setCallback(...) is final on some Android versions and cannot be
* overridden.
* We therefore ensure the wrapped drawable's callback points at this wrapper by
* calling
* mWrapped.setCallback(this) in the constructor and expose
* refreshWrappedCallback()
* so hosts can re-assert the relationship if needed (e.g. after ImageView
* changes state).
*/
public class MatrixDrawable extends Drawable implements Drawable.Callback, Animatable {
private final Drawable mWrapped;
private final Matrix mMatrix = new Matrix();
private final Rect mViewBounds = new Rect();
public MatrixDrawable(@NonNull Drawable wrapped) {
mWrapped = wrapped;
int iw = Math.max(1, wrapped.getIntrinsicWidth());
int ih = Math.max(1, wrapped.getIntrinsicHeight());
// Keep wrapped drawable in drawable-local coordinates:
mWrapped.setBounds(0, 0, iw, ih);
// Ensure wrapped drawable callbacks are delivered to this wrapper
mWrapped.setCallback(this);
}
/**
* Re-assert that the wrapped drawable's callback is this wrapper.
* Call this if you suspect the wrapped drawable's callback may have been
* changed.
*/
public void refreshWrappedCallback() {
mWrapped.setCallback(this);
}
/**
* Set the transformation matrix that maps the wrapped drawable coordinates
* into this drawable's view coordinates. Pass null to reset to identity.
*/
public void setMatrix(@Nullable Matrix matrix) {
mMatrix.reset();
if (matrix != null) {
mMatrix.set(matrix);
}
invalidateSelf();
}
@Override
public void draw(@NonNull Canvas canvas) {
int save = canvas.save();
// Apply the matrix that maps drawable-local coords -> view coords.
canvas.concat(mMatrix);
// Draw the wrapped drawable which is in drawable-local coords.
mWrapped.draw(canvas);
canvas.restoreToCount(save);
}
@Override
public void setAlpha(int alpha) {
mWrapped.setAlpha(alpha);
}
@Override
public void setColorFilter(@Nullable android.graphics.ColorFilter colorFilter) {
mWrapped.setColorFilter(colorFilter);
}
@Override
public int getOpacity() {
return mWrapped.getOpacity();
}
@Override
public void setBounds(int left, int top, int right, int bottom) {
// Bounds here represent the view bounds. Keep them for invalidation and
// measurement,
// but the wrapped drawable remains in drawable-local coords.
super.setBounds(left, top, right, bottom);
mViewBounds.set(left, top, right, bottom);
// ensure wrapped drawable remains in drawable-local coords
int iw = mWrapped.getIntrinsicWidth();
int ih = mWrapped.getIntrinsicHeight();
if (iw <= 0)
iw = 1;
if (ih <= 0)
ih = 1;
mWrapped.setBounds(0, 0, iw, ih);
}
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
mViewBounds.set(bounds);
}
@Override
public int getIntrinsicWidth() {
return mWrapped.getIntrinsicWidth();
}
@Override
public int getIntrinsicHeight() {
return mWrapped.getIntrinsicHeight();
}
@Override
public void getOutline(@NonNull Outline outline) {
// Optional: forward to wrapped drawable's outline if desired. Default behavior
// left empty.
// If you want the wrapper to provide the wrapped outline, uncomment the next
// line:
// mWrapped.getOutline(outline);
super.getOutline(outline);
}
// Drawable.Callback implementations: forward wrapped callbacks to the wrapper
// host
@Override
public void invalidateDrawable(@NonNull Drawable who) {
// When wrapped drawable requests invalidation, propagate invalidation of this
// wrapper.
invalidateSelf();
}
@Override
public void scheduleDrawable(@NonNull Drawable who, @NonNull Runnable what, long when) {
// Forward scheduling to this drawable's callback (typically the View)
final Drawable.Callback cb = getCallback();
if (cb != null) {
cb.scheduleDrawable(this, what, when);
}
}
@Override
public void unscheduleDrawable(@NonNull Drawable who, @NonNull Runnable what) {
final Drawable.Callback cb = getCallback();
if (cb != null) {
cb.unscheduleDrawable(this, what);
}
}
// Animatable forwarding so callers can treat MatrixDrawable as animatable when
// wrapped drawable is
@Override
public void start() {
if (mWrapped instanceof Animatable) {
((Animatable) mWrapped).start();
}
}
@Override
public void stop() {
if (mWrapped instanceof Animatable) {
((Animatable) mWrapped).stop();
}
}
@Override
public boolean isRunning() {
return (mWrapped instanceof Animatable) && ((Animatable) mWrapped).isRunning();
}
@Override
public boolean setVisible(boolean visible, boolean restart) {
boolean changed = super.setVisible(visible, restart);
// forward visibility to wrapped drawable so animations can start/stop
// appropriately
mWrapped.setVisible(visible, restart);
return changed;
}
}
package com.nativescript.image;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.request.target.ViewTarget;
import com.bumptech.glide.request.transition.Transition;
/**
* Glide target that doesn't clear/replace the ImageView if the placeholder is
* null.
* This avoids a transient "blank" state when a Glide request starts without a
* placeholder.
*/
public class MatrixDrawableImageViewTarget extends ViewTarget<ImageView, Drawable>
implements Transition.ViewAdapter {
@Nullable
private Animatable animatable;
public MatrixDrawableImageViewTarget(ImageView view) {
super(view);
}
/**
* @deprecated Use {@link #waitForLayout()} instead.
*/
@SuppressWarnings({"deprecation"})
@Deprecated
public MatrixDrawableImageViewTarget(ImageView view, boolean waitForLayout) {
super(view, waitForLayout);
}
/**
* Returns the current {@link android.graphics.drawable.Drawable} being
* displayed in the view
* using {@link android.widget.ImageView#getDrawable()}.
*/
@Override
@Nullable
public Drawable getCurrentDrawable() {
return view.getDrawable();
}
/**
* Sets the given {@link android.graphics.drawable.Drawable} on the view using
* {@link
* android.widget.ImageView#setImageDrawable(android.graphics.drawable.Drawable)}.
*
* @param drawable {@inheritDoc}
*/
@Override
public void setDrawable(Drawable drawable) {
view.setImageDrawable(drawable);
}
/**
* Sets the given {@link android.graphics.drawable.Drawable} on the view using
* {@link
* android.widget.ImageView#setImageDrawable(android.graphics.drawable.Drawable)}.
*
* @param placeholder {@inheritDoc}
*/
@Override
public void onLoadStarted(@Nullable Drawable placeholder) {
super.onLoadStarted(placeholder);
// setResourceInternal(null);
if (placeholder != null) {
setDrawable(placeholder);
}
}
/**
* Sets the given {@link android.graphics.drawable.Drawable} on the view using
* {@link
* android.widget.ImageView#setImageDrawable(android.graphics.drawable.Drawable)}.
*
* @param errorDrawable {@inheritDoc}
*/
@Override
public void onLoadFailed(@Nullable Drawable errorDrawable) {
super.onLoadFailed(errorDrawable);
setResourceInternal(null);
if (errorDrawable != null) {
setDrawable(errorDrawable);
}
}
/**
* Sets the given {@link android.graphics.drawable.Drawable} on the view using
* {@link
* android.widget.ImageView#setImageDrawable(android.graphics.drawable.Drawable)}.
*
* @param placeholder {@inheritDoc}
*/
@Override
public void onLoadCleared(@Nullable Drawable placeholder) {
super.onLoadCleared(placeholder);
if (animatable != null) {
animatable.stop();
}
// setResourceInternal(null);
if (placeholder != null) {
setDrawable(placeholder);
}
}
@Override
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
if (transition == null || !transition.transition(resource, this)) {
setResourceInternal(resource);
} else {
maybeUpdateAnimatable(resource);
}
}
@Override
public void onStart() {
if (animatable != null) {
animatable.start();
}
}
@Override
public void onStop() {
if (animatable != null) {
animatable.stop();
}
}
private void setResourceInternal(@Nullable Drawable resource) {
// Order matters here. Set the resource first to make sure that the Drawable has
// a valid and
// non-null Callback before starting it.
setResource(resource);
maybeUpdateAnimatable(resource);
}
private void maybeUpdateAnimatable(@Nullable Drawable resource) {
if (resource instanceof Animatable) {
animatable = (Animatable) resource;
animatable.start();
} else {
animatable = null;
}
}
protected void setResource(@Nullable Drawable resource) {
view.setImageDrawable(resource);
}
}
package com.nativescript.image;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.MeasureSpec;
import android.widget.ImageView;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatImageView;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Outline;
import android.graphics.RectF;
import android.graphics.Rect;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.view.ViewOutlineProvider;
import org.nativescript.widgets.BorderDrawable;
import android.util.Log;
/**
* ImageView that exposes setImageRotation(float) and coordinates rotation +
* scaleType.
*
* Enhancements:
* - Re-asserts MatrixDrawable -> wrapped drawable callback binding after the
* wrapper is set on the ImageView,
* to ensure the wrapped drawable's invalidation/schedule callbacks are received
* by the wrapper.
* - Starts/stops Animatable wrapped drawables consistently on
* attach/detach/visibility changes.
* - Aspect-ratio support (like MatrixImageView): setAspectRatio(float) to force
* measured width/height to respect ratio.
* - Supports rotation-aware measurement: when imageRotation is 90 or 270
* degrees, the enforced aspect ratio
* is inverted so measurement reflects the rotated content.
* - Adds a noRatioEnforce flag that disables all aspect-ratio measurement logic
* and simply calls super.onMeasure().
* - Auto-size support: when width or height measure is not finite, the view can
* size itself using
* explicit imageWidth/imageHeight (setImageSize) or the drawable intrinsic
* size.
*
* Protected fields allow subclasses (e.g. ZoomableMatrixImageView) to inspect
* base matrix for clamping.
*/
public class MatrixImageView extends AppCompatImageView {
// made protected so ZoomableMatrixImageView can compute clamped translations
// using base matrix.
protected final Matrix mBaseMatrix = new Matrix(); // rotation + scaleType fit (drawable->view)
protected final Matrix mExtraMatrix = new Matrix(); // user interaction (zoom/pan) in view coords, composed after
// base
private float mImageRotation = 0f;
private ImageView.ScaleType mAppliedScaleType = ImageView.ScaleType.FIT_CENTER;
private ValueAnimator mRotationAnimator;
// Aspect ratio support: value <= 0 means "disabled"
// When > 0, width / height == aspectRatio (same convention as MatrixImageView)
private float mAspectRatio = 0f;
// If true, bypass any aspect-ratio measurement (call super.onMeasure)
private boolean mNoRatioEnforce = false;
// Explicit image size that can be used for measuring when parent constraints
// are not finite.
// If zero, we fall back to drawable intrinsic size.
private int mImageWidth = 0;
private int mImageHeight = 0;
public MatrixImageView(Context context) {
super(context);
init();
}
public MatrixImageView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init();
}
public MatrixImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init() {
// Keep ImageView in MATRIX mode so the system doesn't apply additional
// scaleType transforms.
super.setScaleType(ScaleType.MATRIX);
super.setImageMatrix(new Matrix());
}
/**
* Provide an explicit image size (in pixels) that will be used by onMeasure
* when
* the parent allows the view to size itself (i.e. width or height is not
* EXACTLY).
*
* Pass width=0 && height=0 to clear and fall back to drawable intrinsic size.
*/
public void setImageSize(int width, int height) {
if (mImageWidth == width && mImageHeight == height)
return;
mImageWidth = Math.max(0, width);
mImageHeight = Math.max(0, height);
// When the image size changes, we need to re-measure / layout so any AT_MOST/UNSPECIFIED
// parent dimensions are resolved correctly.
requestLayout();
}
public int getImageWidth() {
return mImageWidth;
}
public int getImageHeight() {
return mImageHeight;
}
/**
* Clear explicit image size; onMeasure will fall back to drawable intrinsic
* size.
*/
public void clearImageSize() {
setImageSize(0, 0);
}
/**
* Aspect ratio API (same sign convention as MatrixImageView):
* - setAspectRatio(r) with r > 0 will cause the view to measure so that
* width/height == r
* - setAspectRatio(0) or negative disables aspect-ratio behavior and falls back
* to normal measuring
*/
public void setAspectRatio(float aspectRatio) {
if (aspectRatio < 0f)
aspectRatio = 0f;
if (Float.compare(mAspectRatio, aspectRatio) == 0)
return;
mAspectRatio = aspectRatio;
requestLayout();
}
public float getAspectRatio() {
return mAspectRatio;
}
/**
* When true, onMeasure will bypass aspect-ratio enforcement and simply call
* super.onMeasure().
*/
public void setNoRatioEnforce(boolean noRatioEnforce) {
if (mNoRatioEnforce == noRatioEnforce)
return;
mNoRatioEnforce = noRatioEnforce;
requestLayout();
}
public boolean isNoRatioEnforce() {
return mNoRatioEnforce;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
// If aspect ratio not set or explicitly disabled, perform auto-size only if
// needed (parent not exact)
if (mNoRatioEnforce) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
return;
}
final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
final int heightSize = MeasureSpec.getSize(heightMeasureSpec);
// Log.d("JS", "onMeasure widthMode: " + widthMode + " heightMode: "+ heightMode + " widthSize: "+ widthSize+ " heightSize: "+ heightSize+ " mAspectRatio: "+ mAspectRatio+ " mImageWidth: "+ mImageWidth+ " mImageHeight: "+ mImageHeight);
// Determine whether parent constrained width/height exactly
final boolean finiteWidth = (widthMode == MeasureSpec.EXACTLY);
final boolean finiteHeight = (heightMode == MeasureSpec.EXACTLY);
// Consider paddings
final int paddingH = getPaddingLeft() + getPaddingRight();
final int paddingV = getPaddingTop() + getPaddingBottom();
// Work with available inner space
int availableWidth = Math.max(0, widthSize - paddingH);
int availableHeight = Math.max(0, heightSize - paddingV);
// Determine the source aspect ratio to use:
// Priority:
// 1) explicit mAspectRatio if > 0
// 2) computed from imageWidth/imageHeight if known
// 3) computed from drawable intrinsic size if available
float aspect = mAspectRatio;
int srcW = mImageWidth;
int srcH = mImageHeight;
if (aspect <= 0f) {
// no explicit aspect ratio, try to derive one from sizes
if (srcW <= 0 || srcH <= 0) {
Drawable d = getDrawable();
if (d != null) {
int iw = d.getIntrinsicWidth();
int ih = d.getIntrinsicHeight();
if (iw > 0 && ih > 0) {
srcW = iw;
srcH = ih;
}
}
}
if (srcW > 0 && srcH > 0) {
aspect = srcW / (float) srcH;
}
}
// If no usable aspect ratio found, fall back to default measurement
if (aspect <= 0f) {
// No usable aspect. As a convenience, when width is EXACT and height is AT_MOST
// prefer the available height (fill vertical constraint) instead of returning
// zero (wrap_content with no drawable).
if ((finiteWidth && !finiteHeight) || (!finiteWidth && finiteHeight)) {
int measuredWidth = availableWidth + paddingH;
int measuredHeight = availableHeight + paddingV;
setMeasuredDimension(resolveSizeAndState(measuredWidth, widthMeasureSpec, 0),
resolveSizeAndState(measuredHeight, heightMeasureSpec, 0));
return;
}
// Fallback to default ImageView behavior otherwise
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
return;
}
// Effective aspect ratio must take into account 90/270 rotation which swaps
// drawable axes.
float effectiveAspect = aspect;
float normalizedRotation = mImageRotation % 360f;
if (normalizedRotation < 0f)
normalizedRotation += 360f;
// If rotation is near 90 or 270 degrees, invert the aspect.
int rot = Math.round(normalizedRotation) % 360;
if ((rot == 90) || (rot == 270)) {
effectiveAspect = 1f / aspect;
}
int measuredWidth;
int measuredHeight;
// If aspect ratio is set (explicit) or derived, apply MatrixImageView-like logic
// with auto size when parent is not exact.
// If width is exact and height is not exact -> compute height from
// width/aspectRatio
if (finiteWidth && !finiteHeight) {
measuredWidth = availableWidth;
measuredHeight = Math.round(measuredWidth / effectiveAspect);
if (heightMode == MeasureSpec.AT_MOST && measuredHeight > availableHeight) {
measuredHeight = availableHeight;
}
measuredWidth += paddingH;
measuredHeight += paddingV;
setMeasuredDimension(resolveSizeAndState(measuredWidth, widthMeasureSpec, 0),
resolveSizeAndState(measuredHeight, heightMeasureSpec, 0));
return;
}
// If height is exact and width is not exact -> compute width from
// height*aspectRatio
else if (finiteHeight && !finiteWidth) {
measuredHeight = availableHeight;
measuredWidth = Math.round(measuredHeight * effectiveAspect);
if (widthMode == MeasureSpec.AT_MOST && measuredWidth > availableWidth) {
measuredWidth = availableWidth;
}
measuredWidth += paddingH;
measuredHeight += paddingV;
setMeasuredDimension(resolveSizeAndState(measuredWidth, widthMeasureSpec, 0),
resolveSizeAndState(measuredHeight, heightMeasureSpec, 0));
return;
}
// If neither dimension is exact, try to size based on image intrinsic/explicit
// size
else if (!finiteWidth && !finiteHeight) {
// If we have a source size (srcW/srcH), use it as a hint to size the view
// (respect aspect)
if (srcW > 0 && srcH > 0) {
// Scale the source size to fit available constraints (AT_MOST) while preserving
// aspect
// If parent constraints are UNSPECIFIED, use source size directly.
int desiredInnerW = srcW;
int desiredInnerH = srcH;
// If width has an AT_MOST constraint, limit by availableWidth
if (widthMode == MeasureSpec.AT_MOST && desiredInnerW > availableWidth) {
desiredInnerW = availableWidth;
desiredInnerH = Math.round(desiredInnerW / effectiveAspect);
}
// If height has an AT_MOST constraint, limit by availableHeight
if (heightMode == MeasureSpec.AT_MOST && desiredInnerH > availableHeight) {
desiredInnerH = availableHeight;
desiredInnerW = Math.round(desiredInnerH * effectiveAspect);
}
measuredWidth = desiredInnerW + paddingH;
measuredHeight = desiredInnerH + paddingV;
setMeasuredDimension(resolveSizeAndState(measuredWidth, widthMeasureSpec, 0),
resolveSizeAndState(measuredHeight, heightMeasureSpec, 0));
return;
} else {
// No source size available -> fall back to default
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
return;
}
}
// Both dimensions are exact (or other cases) -> default measurement
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
@Override
public void setScaleType(ScaleType scaleType) {
if (scaleType == null) {
scaleType = ScaleType.FIT_CENTER;
}
mAppliedScaleType = scaleType;
updateBaseMatrix();
}
/**
* Set rotation (degrees) applied to the drawable before fitting to view.
* This is an immediate set (no animation).
*
* Note: changing rotation may change measured dimensions when aspect-ratio
* enforcement is active.
* We therefore requestLayout() so measurement reflects the rotated aspect.
*/
public void setImageRotation(float degrees) {
cancelRotationAnimation();
if (Float.compare(mImageRotation, degrees) == 0)
return;
mImageRotation = degrees;
// rotation can affect measurement when aspect-ratio is enforced (90/270 swap)
requestLayout();
updateBaseMatrix();
}
/**
* Get current image rotation in degrees.
*/
public float getImageRotation() {
return mImageRotation;
}
/**
* Animate rotation from current rotation to target degrees.
*
* @param toDegrees target rotation value in degrees
* @param durationMs duration in milliseconds (use 0 for immediate)
*
* Note: the animation will call requestLayout() on each
* update so the view can adjust layout
* if the rotation crosses axis swap thresholds or if you want
* continuous relayout during animation.
* This is potentially expensive; disable aspect-ratio or
* setNoRatioEnforce(true) if you prefer no layout churn.
*/
public void animateImageRotation(float toDegrees, long durationMs) {
cancelRotationAnimation();
if (durationMs <= 0) {
setImageRotation(toDegrees);
return;
}
mRotationAnimator = ValueAnimator.ofFloat(mImageRotation, toDegrees);
mRotationAnimator.setDuration(durationMs);
mRotationAnimator.addUpdateListener(animation -> {
float value = (float) animation.getAnimatedValue();
mImageRotation = value;
// rotation may affect measurement; request layout to update sizing while
// animating.
requestLayout();
updateBaseMatrix();
});
mRotationAnimator.start();
}
/**
* Cancel any running rotation animation.
*/
public void cancelRotationAnimation() {
if (mRotationAnimator != null) {
mRotationAnimator.cancel();
mRotationAnimator = null;
}
}
@Override
public void setImageDrawable(@Nullable Drawable drawable) {
if (drawable == null) {
// stop any wrapped animatable and clear
Drawable old = getDrawable();
if (old instanceof Animatable) {
((Animatable) old).stop();
}
setImageSize(0, 0);
super.setImageDrawable(null);
// clear implicit image size when drawable removed
// (do not clear explicit mImageWidth/mImageHeight set by caller)
return;
}
setImageSize(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
MatrixDrawable md = new MatrixDrawable(drawable);
// set the wrapper as the ImageView drawable - AppCompatImageView will set the
// wrapper's callback to the view.
super.setImageDrawable(md);
// Re-assert the wrapped drawable's callback -> wrapper relationship (safe no-op
// if already set).
md.refreshWrappedCallback();
// If caller hasn't set an explicit image size, capture drawable intrinsic size
// as a hint for measuring
if (mImageWidth <= 0 || mImageHeight <= 0) {
int iw = drawable.getIntrinsicWidth();
int ih = drawable.getIntrinsicHeight();
if (iw > 0 && ih > 0) {
mImageWidth = iw;
mImageHeight = ih;
// we captured a size that may affect measurement
requestLayout();
}
}
// Ensure the next updateBaseMatrix applies the matrix to the new wrapper instance.
mLastComposedDrawable = null;
updateBaseMatrix();
// If underlying drawable is animatable and ImageView is visible, start it
if (drawable instanceof Animatable && getVisibility() == VISIBLE) {
((Animatable) drawable).start();
}
}
// cache last composed matrix so we can no-op identical updates (avoid repeated invalidates)
private final Matrix mLastComposedMatrix = new Matrix();
// The drawable instance we last applied mLastComposedMatrix to. If a new drawable is
// installed (wrapper changed), we must still apply the composed matrix even if values match.
private Drawable mLastComposedDrawable = null;
private static boolean matricesApproxEqual(Matrix a, Matrix b, float eps) {
float[] va = new float[9];
float[] vb = new float[9];
a.getValues(va);
b.getValues(vb);
for (int i = 0; i < 9; ++i) {
if (Math.abs(va[i] - vb[i]) > eps) return false;
}
return true;
}
private void updateBaseMatrix() {
Drawable d = getDrawable();
if (d == null)
return;
int vw = getWidth() - getPaddingLeft() - getPaddingRight();
int vh = getHeight() - getPaddingTop() - getPaddingBottom();
Matrix base = new Matrix();
if (vw > 0 && vh > 0) {
ScaleUtils.getImageMatrix(d, vw, vh, mImageRotation, mAppliedScaleType, base);
}
mBaseMatrix.set(base);
// Compose base + extra into one matrix and apply to the MatrixDrawable wrapper
Matrix composed = new Matrix(mBaseMatrix);
composed.postConcat(mExtraMatrix);
// No-op only if composed matrix hasn't changed AND the drawable instance is the same.
// If the wrapper changed, we must explicitly set the composed matrix on the new wrapper.
if (d == mLastComposedDrawable && matricesApproxEqual(mLastComposedMatrix, composed, 1e-6f)) {
return;
}
mLastComposedMatrix.set(composed);
mLastComposedDrawable = d;
if (d instanceof MatrixDrawable) {
((MatrixDrawable) d).setMatrix(composed);
} else {
// Fallback: if drawable is not wrapped, fall back on ImageView's matrix
super.setImageMatrix(composed);
}
// Use VSync-friendly invalidation.
postInvalidateOnAnimation();
}
/**
* Apply additional transform on top of rotation+scaleType fit (e.g. zoom/pan).
* The passed matrix is interpreted in view coordinates and will be
* post-concatenated after base.
* If extra is null, the base matrix alone is used.
*/
public void setExtraTransform(@Nullable Matrix extra) {
mExtraMatrix.reset();
if (extra != null) {
mExtraMatrix.set(extra);
}
updateBaseMatrix();
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
// If drawable is animatable, start it when attached and visible
Drawable d = getDrawable();
if (d instanceof Animatable && getVisibility() == VISIBLE) {
((Animatable) d).start();
}
// If we have a MatrixDrawable, re-assert wrapped callback relationship
if (d instanceof MatrixDrawable) {
((MatrixDrawable) d).refreshWrappedCallback();
}
}
@Override
protected void onDetachedFromWindow() {
// stop any animatables to avoid leaks
Drawable d = getDrawable();
if (d instanceof Animatable) {
((Animatable) d).stop();
}
cancelRotationAnimation();
super.onDetachedFromWindow();
}
@Override
protected void onVisibilityChanged(View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
Drawable d = getDrawable();
if (d instanceof Animatable) {
if (visibility == VISIBLE) {
((Animatable) d).start();
} else {
((Animatable) d).stop();
}
}
// If drawable exists and is MatrixDrawable, re-assert wrapped callback
// relationship
if (d instanceof MatrixDrawable) {
((MatrixDrawable) d).refreshWrappedCallback();
}
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
updateBaseMatrix();
super.onSizeChanged(w, h, oldw, oldh);
updateOutlineProvider();
}
// Add this method to MatrixImageView (insert into the class body)
public void resetInteraction() {
// Reset any extra interaction transform (zoom/pan) and update the view.
mExtraMatrix.reset();
// Apply the cleared extra transform
setExtraTransform(null);
// Notify layout/state if necessary (no-op here)
}
// Hook for subclasses to validate & clamp current scale (no-op for non-zoomable base view)
protected void ensureCurrentScaleInBounds() { /* no-op for base */ }
public boolean isUsingOutlineProvider = false;
private static Paint clipPaint;
public void updateOutlineProvider() {
Drawable drawable = getBackground();
if (android.os.Build.VERSION.SDK_INT >= 21) {
// we try to support N setting outline provider now
if (!isUsingOutlineProvider && getOutlineProvider() != null) {
// already handled somewhere else
return;
}
if (drawable instanceof BorderDrawable && (android.os.Build.VERSION.SDK_INT >= 33 || ((BorderDrawable)drawable).hasUniformBorderRadius())) {
setOutlineProvider(new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
Drawable drawable = getBackground();
if (drawable instanceof BorderDrawable) {
BorderDrawable borderDrawable = (BorderDrawable) drawable;
// that if test is only needed until N BorderDrawable is updated to do it
if (borderDrawable.hasUniformBorderRadius()) {
// outlineRect.set(borderDrawable.getBounds());
outline.setRoundRect(borderDrawable.getBounds(), borderDrawable.getBorderBottomLeftRadius());
} else {
drawable.getOutline(outline);
}
} else {
outline.setRect(100, 100, view.getWidth() - 200, view.getHeight() - 200);
}
}
});
setClipToOutline(true);
isUsingOutlineProvider = true;
// } else if (android.os.Build.VERSION.SDK_INT >= 21) {
// isUsingOutlineProvider = false;
// setOutlineProvider(null);
// setClipToOutline(false);
}
}
}
@Override
public void setBackground(Drawable background) {
super.setBackground(background);
updateOutlineProvider();
}
Path innerBorderPath;
Path innerBorderTempPath;
private Path generateInnerBorderPath(BorderDrawable borderDrawable) {
float borderTopLeftRadius = borderDrawable.getBorderTopLeftRadius();
float borderTopRightRadius = borderDrawable.getBorderTopRightRadius();
float borderBottomRightRadius = borderDrawable.getBorderBottomRightRadius();
float borderBottomLeftRadius = borderDrawable.getBorderBottomLeftRadius();
float borderLeftWidth = borderDrawable.getBorderLeftWidth();
float borderBottomWidth = borderDrawable.getBorderBottomWidth();
float borderTopWidth = borderDrawable.getBorderTopWidth();
float borderRightWidth = borderDrawable.getBorderRightWidth();
if (innerBorderPath == null) {
innerBorderPath = new Path();
} else {
innerBorderPath.reset();
}
if (innerBorderTempPath == null) {
innerBorderTempPath = new Path();
} else {
innerBorderTempPath.reset();
}
Rect bounds = borderDrawable.getBounds();
float width = (float) borderDrawable.getBounds().width();
float height = (float) borderDrawable.getBounds().height();
RectF borderInnerRect = new RectF(borderLeftWidth, borderTopWidth, width - borderRightWidth,
height - borderBottomWidth);
float[] borderInnerRadii = { Math.max(0, borderTopLeftRadius - borderLeftWidth),
Math.max(0, borderTopLeftRadius - borderTopWidth), Math.max(0, borderTopRightRadius - borderRightWidth),
Math.max(0, borderTopRightRadius - borderTopWidth),
Math.max(0, borderBottomRightRadius - borderRightWidth),
Math.max(0, borderBottomRightRadius - borderBottomWidth),
Math.max(0, borderBottomLeftRadius - borderLeftWidth),
Math.max(0, borderBottomLeftRadius - borderBottomWidth) };
innerBorderTempPath.addRoundRect(borderInnerRect, borderInnerRadii, Path.Direction.CW);
innerBorderPath.addRect(new RectF(bounds), Path.Direction.CW);
innerBorderPath.op(innerBorderTempPath, Path.Op.DIFFERENCE);
return innerBorderPath;
}
@Override
protected void onDraw(Canvas canvas) {
Drawable drawable = getBackground();
if (!isUsingOutlineProvider && drawable instanceof BorderDrawable) {
BorderDrawable borderDrawable = (BorderDrawable) drawable;
Path clipPath = generateInnerBorderPath(borderDrawable);
if (clipPath != null) {
if (MatrixImageView.clipPaint == null) {
MatrixImageView.clipPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
MatrixImageView.clipPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
}
int saveCount;
int width = getWidth();
int height = getHeight();
if (android.os.Build.VERSION.SDK_INT >= 21) {
saveCount = canvas.saveLayer(new android.graphics.RectF(0.0f, 0.0f, width, height), null);
} else {
saveCount = canvas.saveLayer(0.0f, 0.0f, width, height, null, Canvas.ALL_SAVE_FLAG);
}
super.onDraw(canvas);
canvas.drawPath(clipPath, MatrixImageView.clipPaint);
canvas.restoreToCount(saveCount);
return;
}
}
super.onDraw(canvas);
}
}
package com.nativescript.image;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Response;
public class ProgressInterceptor implements Interceptor {
private final String url;
private final ImageProgressCallback callback;
public ProgressInterceptor(String url, ImageProgressCallback callback) {
this.url = url;
this.callback = callback;
}
@Override
public Response intercept(Chain chain) throws IOException {
Response originalResponse = chain.proceed(chain.request());
// Wrap response body with progress tracking
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), url, callback))
.build();
}
}
package com.nativescript.image;
import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
import okio.ForwardingSource;
import okio.Okio;
import okio.Source;
public class ProgressResponseBody extends ResponseBody {
private final ResponseBody responseBody;
private final String url;
private final ImageProgressCallback callback;
private BufferedSource bufferedSource;
public ProgressResponseBody(ResponseBody responseBody, String url, ImageProgressCallback callback) {
this.responseBody = responseBody;
this.url = url;
this.callback = callback;
}
@Override
public MediaType contentType() {
return responseBody.contentType();
}
@Override
public long contentLength() {
return responseBody.contentLength();
}
@Override
public BufferedSource source() {
if (bufferedSource == null) {
bufferedSource = Okio.buffer(source(responseBody.source()));
}
return bufferedSource;
}
private Source source(Source source) {
return new ForwardingSource(source) {
long totalBytesRead = 0L;
long lastNotified = 0L;
static final long NOTIFY_INTERVAL = 8192L; // 8KB
@Override
public long read(Buffer sink, long byteCount) throws IOException {
long bytesRead = super.read(sink, byteCount);
if (bytesRead != -1) {
totalBytesRead += bytesRead;
// Notify if we've read enough bytes or at completion
if (totalBytesRead - lastNotified >= NOTIFY_INTERVAL ||
totalBytesRead >= contentLength()) {
if (callback != null) {
callback.onProgress(url, totalBytesRead, contentLength());
}
lastNotified = totalBytesRead;
}
}
return bytesRead;
}
};
}
}
package com.nativescript.image;
import java.io.ByteArrayOutputStream;
import java.security.MessageDigest;
/**
* Small MessageDigest that records raw bytes passed to update(...).
* We don't compute a digest here: we simply capture the bytes that callers
* write by calling
* update(byte[]) so we can later replay them into another MessageDigest.
*
* Usage:
* RecordingDigest r = new RecordingDigest();
* transformation.updateDiskCacheKey(r);
* byte[] bytes = r.digest(); // returns the concatenated bytes that
* transformation wrote
*/
public final class RecordingDigest extends MessageDigest {
private final ByteArrayOutputStream out = new ByteArrayOutputStream();
public RecordingDigest() {
// algorithm name is arbitrary here; we do not rely on MessageDigest's actual
// hashing.
super("NONE");
}
@Override
protected void engineUpdate(byte input) {
out.write(input);
}
@Override
protected void engineUpdate(byte[] input, int offset, int len) {
out.write(input, offset, len);
}
@Override
protected byte[] engineDigest() {
byte[] result = out.toByteArray();
out.reset();
return result;
}
@Override
protected void engineReset() {
out.reset();
}
}
package com.nativescript.image;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.Key;
import java.nio.ByteBuffer;
import java.security.MessageDigest;
import java.util.Objects;
/**
* Recreates ResourceCacheKey updateDiskCacheKey ordering but accepts
* precomputed transformation
* and options key bytes. This avoids the need to reconstruct
* Transformation/Options objects.
*
* Ordering mirrors Glide's ResourceCacheKey:
* signature.updateDiskCacheKey(md)
* sourceKey.updateDiskCacheKey(md)
* md.update(dimensions)
* md.update(transformationKeyBytes) -- if present
* md.update(optionsKeyBytes) -- if present
* md.update(decodedResourceClass.getName().getBytes(...))
*/
public final class RecreatedResourceKey implements Key {
private final Key sourceKey;
private final Key signature;
private final int width;
private final int height;
private final byte[] transformationKeyBytes; // may be null
private final Class<?> decodedResourceClass;
private final byte[] optionsKeyBytes; // may be null
public RecreatedResourceKey(
Key sourceKey,
Key signature,
int width,
int height,
byte[] transformationKeyBytes,
Class<?> decodedResourceClass,
byte[] optionsKeyBytes) {
this.sourceKey = Objects.requireNonNull(sourceKey);
this.signature = Objects.requireNonNull(signature);
this.width = width;
this.height = height;
this.transformationKeyBytes = transformationKeyBytes;
this.decodedResourceClass = Objects.requireNonNull(decodedResourceClass);
this.optionsKeyBytes = optionsKeyBytes;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof RecreatedResourceKey))
return false;
RecreatedResourceKey that = (RecreatedResourceKey) o;
return width == that.width
&& height == that.height
&& sourceKey.equals(that.sourceKey)
&& signature.equals(that.signature)
&& java.util.Arrays.equals(transformationKeyBytes, that.transformationKeyBytes)
&& decodedResourceClass.equals(that.decodedResourceClass)
&& java.util.Arrays.equals(optionsKeyBytes, that.optionsKeyBytes);
}
@Override
public int hashCode() {
int result = sourceKey.hashCode();
result = 31 * result + signature.hashCode();
result = 31 * result + width;
result = 31 * result + height;
result = 31 * result + java.util.Arrays.hashCode(transformationKeyBytes);
result = 31 * result + decodedResourceClass.hashCode();
result = 31 * result + java.util.Arrays.hashCode(optionsKeyBytes);
return result;
}
@Override
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
byte[] dimensions = ByteBuffer.allocate(8).putInt(width).putInt(height).array();
signature.updateDiskCacheKey(messageDigest);
sourceKey.updateDiskCacheKey(messageDigest);
messageDigest.update(dimensions);
if (transformationKeyBytes != null) {
messageDigest.update(transformationKeyBytes);
}
if (optionsKeyBytes != null) {
messageDigest.update(optionsKeyBytes);
}
messageDigest.update(decodedResourceClass.getName().getBytes(CHARSET));
}
}
package com.nativescript.image;
import android.graphics.drawable.Drawable;
import android.util.Log;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.load.engine.GlideException;
/**
* RequestListener that records the disk & transformation key bytes used for a
* request
* and persists them via EvictionManager so later evictions / presence checks
* can recreate
* the exact disk keys without needing to recreate Transformation objects.
*
* Usage:
* - Preferred: pass a RequestOptions instance; this listener will extract the
* internal Options
* via ExtractRequestOptions (cached reflection) so your existing RequestOptions
* usage continues to work.
* - Alternative: pass an Options instance directly if you already have it.
*
* The listener returns false from callbacks so it does not short-circuit other
* listeners or Glide's handling.
*/
public final class SaveKeysRequestListener implements RequestListener<Drawable> {
private static final String TAG = "SaveKeysRequestListener";
private final String id; // canonical id you use to later evict (typically the URL string or normalized
// model id)
private final Object model; // the same model object you pass to Glide.load(...)
private final Key sourceKey;
private final Key signature;
private final int width;
private final int height;
@Nullable
private final Transformation<?> transformation;
private final Options options;
private final Class<?> decodedResourceClass;
/**
* Construct directly with an Options instance.
*/
public SaveKeysRequestListener(
String id,
Object model,
Key sourceKey,
Key signature,
int width,
int height,
@Nullable Transformation<?> transformation,
RequestOptions options,
Class<?> decodedResourceClass) {
this.id = id;
this.model = model;
this.sourceKey = sourceKey;
this.signature = signature;
this.width = width;
this.height = height;
this.transformation = transformation;
this.options = (options == null) ? new Options() : ExtractRequestOptions.getFrom(options);
this.decodedResourceClass = (decodedResourceClass == null) ? Drawable.class : decodedResourceClass;
}
@Override
public boolean onLoadFailed(GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
// We don't persist anything on failure (could be added). Do not consume the
// event.
return false;
}
@Override
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target,
com.bumptech.glide.load.DataSource dataSource, boolean isFirstResource) {
try {
byte[] transformationBytes = null;
byte[] optionsBytes = null;
// Record transformation key bytes if we have a transformation instance
if (transformation != null) {
try {
RecordingDigest rd = new RecordingDigest();
transformation.updateDiskCacheKey(rd);
transformationBytes = rd.digest();
} catch (Throwable t) {
Log.w(TAG, "Failed to record transformation key bytes for id=" + id, t);
}
}
// Record options key bytes (Options.updateDiskCacheKey)
try {
RecordingDigest rd2 = new RecordingDigest();
options.updateDiskCacheKey(rd2);
optionsBytes = rd2.digest();
} catch (Throwable t) {
Log.w(TAG, "Failed to record options key bytes for id=" + id, t);
}
// Attempt to preserve existing engineKey if present
com.bumptech.glide.load.Key engineKeyToKeep = null;
try {
CacheKeyStore.StoredKeys existing = null;
if (EvictionManager.get() != null) {
// use the public API to fetch current stored keys for this id (may be
// persistent or in-memory)
existing = EvictionManager.get().getKeyStore().get(id);
}
if (existing != null && existing.engineKey != null) {
engineKeyToKeep = existing.engineKey;
}
} catch (Throwable t) {
Log.w(TAG, "Failed to read existing stored keys to preserve engineKey for id=" + id, t);
}
// Build StoredKeys and persist via EvictionManager
CacheKeyStore.StoredKeys stored = new CacheKeyStore.StoredKeys(
sourceKey,
signature,
width,
height,
transformation, // may be null; kept for in-process fallback
transformationBytes, // recorded transformation bytes (preferred)
decodedResourceClass,
options,
optionsBytes,
engineKeyToKeep // preserve any engineKey we found
);
EvictionManager.get().saveKeys(id, stored);
} catch (Throwable t) {
Log.w(TAG, "Unexpected error in SaveKeysRequestListener.onResourceReady for id=" + id, t);
}
// Do not consume the event; allow other listeners and Glide to continue normal
// handling.
return false;
}
}
package com.nativescript.image;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
/**
* Utilities to compute an image -> view matrix that respects an
* ImageView.ScaleType
* while also applying an image rotation (degrees).
*
* Notes:
* - Rotation is applied around the drawable's center before fitting/scaling.
* - The output matrix maps drawable coordinates to view coordinates.
*
* Usage:
* Matrix m = new Matrix();
* ScaleUtils.getImageMatrix(drawable, viewWidth, viewHeight, rotationDegrees,
* scaleType, m);
*/
public final class ScaleUtils {
private ScaleUtils() {
}
/**
* Compute a matrix that maps the drawable (drawable-local coords:
* 0..intrinsicW/H)
* into view coordinates, applying rotation (degrees) about the drawable center
* first,
* then the scaleType fit.
*
* rotationDegrees is a float to allow smooth animated rotation.
*/
public static void getImageMatrix(
Drawable d,
int viewWidth,
int viewHeight,
float rotationDegrees,
ImageView.ScaleType scaleType,
Matrix outMatrix) {
if (d == null) {
outMatrix.reset();
return;
}
float dW = d.getIntrinsicWidth();
float dH = d.getIntrinsicHeight();
if (dW <= 0 || dH <= 0 || viewWidth == 0 || viewHeight == 0) {
outMatrix.reset();
return;
}
RectF src = new RectF(0, 0, dW, dH);
Matrix m = new Matrix();
// 1) rotate around drawable center (drawable-local coords)
if ((rotationDegrees % 360f) != 0f) {
m.postRotate(rotationDegrees, dW / 2f, dH / 2f);
}
// 2) compute rotated drawable bounds in drawable-local coords
RectF rotated = new RectF();
m.mapRect(rotated, src);
float rW = rotated.width();
float rH = rotated.height();
float scaleX = (float) viewWidth / rW;
float scaleY = (float) viewHeight / rH;
switch (scaleType) {
case CENTER:
// no scaling, center only; rotation already applied
break;
case CENTER_CROP: {
float scale = Math.max(scaleX, scaleY);
m.postScale(scale, scale, dW / 2f, dH / 2f);
break;
}
case CENTER_INSIDE: {
float scale = Math.min(1f, Math.min(scaleX, scaleY));
m.postScale(scale, scale, dW / 2f, dH / 2f);
break;
}
case FIT_CENTER:
case FIT_START:
case FIT_END:
case FIT_XY: {
if (scaleType == ImageView.ScaleType.FIT_XY) {
m.postScale(scaleX, scaleY, dW / 2f, dH / 2f);
} else {
float scale = Math.min(scaleX, scaleY);
m.postScale(scale, scale, dW / 2f, dH / 2f);
}
break;
}
case MATRIX:
default:
// Let the caller manage the matrix in MATRIX mode; here treat like FIT_CENTER.
float scale = Math.min(scaleX, scaleY);
m.postScale(scale, scale, dW / 2f, dH / 2f);
break;
}
// 3) translate to position according to scaleType
RectF mapped = new RectF();
m.mapRect(mapped, src);
float dx = 0f;
float dy = 0f;
if (scaleType == ImageView.ScaleType.FIT_START) {
dx = 0f - mapped.left;
dy = 0f - mapped.top;
} else if (scaleType == ImageView.ScaleType.FIT_END) {
dx = viewWidth - mapped.right;
dy = viewHeight - mapped.bottom;
} else {
// center
dx = viewWidth * 0.5f - mapped.centerX();
dy = viewHeight * 0.5f - mapped.centerY();
}
m.postTranslate(dx, dy);
outMatrix.set(m);
}
}
package com.nativescript.image;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Base64;
import org.json.JSONException;
import org.json.JSONObject;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.signature.ObjectKey;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.Transformation;
/**
* SharedPreferences-backed minimal persistent store.
* Stores:
* - source (string)
* - signature (string)
* - width, height
* - decodedResourceClass (string)
* - transformationKeyBytes (base64)
* - optionsKeyBytes (base64)
*
* For transformations: we store recorded bytes (from RecordingDigest) rather
* than trying to
* re-create the Transformation object.
*/
public class SharedPrefCacheKeyStore {
private static final String PREFS = "glide_cache_keys_v2";
private final SharedPreferences prefs;
public SharedPrefCacheKeyStore(Context context) {
this.prefs = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE);
}
public void put(String id, CacheKeyStore.StoredKeys keys) {
try {
JSONObject j = new JSONObject();
j.put("source", keys.sourceKey == null ? JSONObject.NULL : keys.sourceKey.toString());
j.put("signature", keys.signature == null ? JSONObject.NULL : keys.signature.toString());
j.put("width", keys.width);
j.put("height", keys.height);
j.put("decodedResourceClass",
keys.decodedResourceClass == null ? JSONObject.NULL : keys.decodedResourceClass.getName());
j.put("transformationBytes", keys.transformationKeyBytes == null ? JSONObject.NULL
: Base64.encodeToString(keys.transformationKeyBytes, Base64.NO_WRAP));
j.put("optionsBytes",
keys.optionsKeyBytes == null ? JSONObject.NULL : Base64.encodeToString(keys.optionsKeyBytes, Base64.NO_WRAP));
prefs.edit().putString(id, j.toString()).apply();
} catch (JSONException e) {
// log if you want
}
}
public CacheKeyStore.StoredKeys get(String id) {
String s = prefs.getString(id, null);
if (s == null)
return null;
try {
JSONObject j = new JSONObject(s);
String source = j.optString("source", null);
String signature = j.optString("signature", null);
int width = j.optInt("width", com.bumptech.glide.request.target.Target.SIZE_ORIGINAL);
int height = j.optInt("height", com.bumptech.glide.request.target.Target.SIZE_ORIGINAL);
String decodedName = j.optString("decodedResourceClass", android.graphics.Bitmap.class.getName());
String transformationBase64 = j.optString("transformationBytes", null);
String optionsBase64 = j.optString("optionsBytes", null);
Key sourceKey = source != null && !"null".equals(source) ? new ObjectKey(source) : new ObjectKey(id);
Key signatureKey = signature != null && !"null".equals(signature) ? new ObjectKey(signature)
: new ObjectKey("signature-none");
Class<?> decodedClass = Class.forName(decodedName);
byte[] transformationBytes = (transformationBase64 == null || "null".equals(transformationBase64)) ? null
: Base64.decode(transformationBase64, Base64.NO_WRAP);
byte[] optionsBytes = (optionsBase64 == null || "null".equals(optionsBase64)) ? null
: Base64.decode(optionsBase64, Base64.NO_WRAP);
// We cannot re-create a reliable Options instance from optionsBytes. We store
// optionsBytes and will replay them
// into the ResourceCacheKey digest when deleting. For in-memory Options pass an
// empty instance or the caller's instance.
Options options = new Options();
return new CacheKeyStore.StoredKeys(sourceKey, signatureKey, width, height, /* transformation */ null,
transformationBytes, decodedClass, options, optionsBytes, /* engineKey */ null);
} catch (Exception e) {
return null;
}
}
public void remove(String id) {
prefs.edit().remove(id).apply();
}
}

Sorry, the diff of this file is too big to display

/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable @typescript-eslint/adjacent-overload-signatures */
/* eslint-disable no-redeclare */
/// <reference path="android-declarations.d.ts"/>
declare namespace com {
export namespace bumptech {
export namespace glide {
export namespace annotation {
export namespace compiler {
export class GlideIndexer_GlideModule_com_bumptech_glide_integration_okhttp3_OkHttpLibraryGlideModule {
public static class: java.lang.Class<com.bumptech.glide.annotation.compiler.GlideIndexer_GlideModule_com_bumptech_glide_integration_okhttp3_OkHttpLibraryGlideModule>;
public constructor();
}
}
}
}
}
}
declare namespace com {
export namespace bumptech {
export namespace glide {
export namespace integration {
export namespace okhttp3 {
export class OkHttpGlideModule {
public static class: java.lang.Class<com.bumptech.glide.integration.okhttp3.OkHttpGlideModule>;
public constructor();
public registerComponents(context: globalAndroid.content.Context, glide: com.bumptech.glide.Glide, registry: com.bumptech.glide.Registry): void;
public applyOptions(context: globalAndroid.content.Context, builder: com.bumptech.glide.GlideBuilder): void;
}
}
}
}
}
}
declare namespace com {
export namespace bumptech {
export namespace glide {
export namespace integration {
export namespace okhttp3 {
export class OkHttpLibraryGlideModule {
public static class: java.lang.Class<com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule>;
public constructor();
public registerComponents(context: globalAndroid.content.Context, glide: com.bumptech.glide.Glide, registry: com.bumptech.glide.Registry): void;
}
}
}
}
}
}
declare namespace com {
export namespace bumptech {
export namespace glide {
export namespace integration {
export namespace okhttp3 {
export class OkHttpStreamFetcher extends java.lang.Object {
public static class: java.lang.Class<com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher>;
public onFailure(call: okhttp3.Call, e: java.io.IOException): void;
public getDataClass(): java.lang.Class<java.io.InputStream>;
public getDataSource(): com.bumptech.glide.load.DataSource;
public cancel(): void;
public constructor(client: okhttp3.Call.Factory, url: com.bumptech.glide.load.model.GlideUrl);
public onResponse(this_: okhttp3.Call, call: okhttp3.Response): void;
public loadData(headerEntry: com.bumptech.glide.Priority, this_: com.bumptech.glide.load.data.DataFetcher.DataCallback<any>): void;
public cleanup(): void;
}
}
}
}
}
}
declare namespace com {
export namespace bumptech {
export namespace glide {
export namespace integration {
export namespace okhttp3 {
export class OkHttpUrlLoader extends com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,java.io.InputStream> {
public static class: java.lang.Class<com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader>;
public constructor(client: okhttp3.Call.Factory);
public handles(url: com.bumptech.glide.load.model.GlideUrl): boolean;
public buildLoadData(model: com.bumptech.glide.load.model.GlideUrl, width: number, height: number, options: com.bumptech.glide.load.Options): com.bumptech.glide.load.model.ModelLoader.LoadData<java.io.InputStream>;
}
export namespace OkHttpUrlLoader {
export class Factory extends com.bumptech.glide.load.model.ModelLoaderFactory<com.bumptech.glide.load.model.GlideUrl,java.io.InputStream> {
public static class: java.lang.Class<com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader.Factory>;
public constructor();
public build(multiFactory: com.bumptech.glide.load.model.MultiModelLoaderFactory): com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,java.io.InputStream>;
public constructor(client: okhttp3.Call.Factory);
public teardown(): void;
}
}
}
}
}
}
}
//Generics information:
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable @typescript-eslint/adjacent-overload-signatures */
/* eslint-disable no-redeclare */
/// <reference path="android-declarations.d.ts"/>
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export abstract class BitmapTransformation extends com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap> {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.BitmapTransformation>;
public equals(param0: any): boolean;
public transform(param0: globalAndroid.content.Context, param1: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, param2: globalAndroid.graphics.Bitmap, param3: number, param4: number): globalAndroid.graphics.Bitmap;
public constructor();
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public hashCode(): number;
public updateDiskCacheKey(param0: java.security.MessageDigest): void;
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class BlurTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.BlurTransformation>;
public toString(): string;
public constructor();
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, pool: globalAndroid.graphics.Bitmap, toTransform: number, outWidth: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public constructor(radius: number);
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public constructor(radius: number, sampling: number);
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class BuildConfig {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.BuildConfig>;
/**
* 0
*/
public static DEBUG: boolean;
/**
* "jp.wasabeef.glide.transformations"
*/
public static LIBRARY_PACKAGE_NAME: string;
/**
* "release"
*/
public static BUILD_TYPE: string;
public constructor();
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class ColorFilterTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.ColorFilterTransformation>;
public toString(): string;
public constructor();
public constructor(color: number);
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class CropCircleTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.CropCircleTransformation>;
public toString(): string;
public constructor();
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class CropCircleWithBorderTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.CropCircleWithBorderTransformation>;
public constructor(borderSize: number, borderColor: number);
public constructor();
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class CropSquareTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.CropSquareTransformation>;
public toString(): string;
public constructor();
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class CropTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.CropTransformation>;
public constructor(width: number, height: number, cropType: jp.wasabeef.glide.transformations.CropTransformation.CropType);
public toString(): string;
public constructor();
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public constructor(width: number, height: number);
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
export namespace CropTransformation {
export class CropType {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.CropTransformation.CropType>;
public static TOP: jp.wasabeef.glide.transformations.CropTransformation.CropType;
public static CENTER: jp.wasabeef.glide.transformations.CropTransformation.CropType;
public static BOTTOM: jp.wasabeef.glide.transformations.CropTransformation.CropType;
public static values(): androidNative.Array<jp.wasabeef.glide.transformations.CropTransformation.CropType>;
public static valueOf(name: string): jp.wasabeef.glide.transformations.CropTransformation.CropType;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class GrayscaleTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.GrayscaleTransformation>;
public toString(): string;
public constructor();
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class MaskTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.MaskTransformation>;
public toString(): string;
public constructor();
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public constructor(maskId: number);
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public equals(o: any): boolean;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export class RoundedCornersTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.RoundedCornersTransformation>;
public toString(): string;
public constructor();
public constructor(radius: number, margin: number, cornerType: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType);
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public constructor(radius: number, margin: number);
public equals(o: any): boolean;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
export namespace RoundedCornersTransformation {
export class CornerType {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType>;
public static ALL: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static TOP_LEFT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static TOP_RIGHT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static BOTTOM_LEFT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static BOTTOM_RIGHT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static TOP: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static BOTTOM: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static LEFT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static RIGHT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static OTHER_TOP_LEFT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static OTHER_TOP_RIGHT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static OTHER_BOTTOM_LEFT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static OTHER_BOTTOM_RIGHT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static DIAGONAL_FROM_TOP_LEFT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static DIAGONAL_FROM_TOP_RIGHT: jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
public static values(): androidNative.Array<jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType>;
public static valueOf(name: string): jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class BrightnessFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.BrightnessFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public constructor(brightness: number);
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class ContrastFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.ContrastFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public constructor(contrast: number);
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class GPUFilterTransformation extends jp.wasabeef.glide.transformations.BitmapTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public transform(this_: globalAndroid.content.Context, context: com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>, resource: number, outWidth: number): com.bumptech.glide.load.engine.Resource<globalAndroid.graphics.Bitmap>;
public constructor();
public transform(context: globalAndroid.content.Context, pool: com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool, toTransform: globalAndroid.graphics.Bitmap, outWidth: number, outHeight: number): globalAndroid.graphics.Bitmap;
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public getFilter(): any;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class InvertFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.InvertFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class KuwaharaFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.KuwaharaFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public constructor(radius: number);
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class PixelationFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.PixelationFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public constructor(pixel: number);
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class SepiaFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.SepiaFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public constructor(intensity: number);
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class SketchFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.SketchFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class SwirlFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.SwirlFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public constructor(radius: number, angle: number, center: globalAndroid.graphics.PointF);
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class ToonFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.ToonFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor();
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public constructor(threshold: number, quantizationLevels: number);
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace gpu {
export class VignetteFilterTransformation extends jp.wasabeef.glide.transformations.gpu.GPUFilterTransformation {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.gpu.VignetteFilterTransformation>;
public constructor(filter: jp.co.cyberagent.android.gpuimage.filter.GPUImageFilter);
public constructor(center: globalAndroid.graphics.PointF, color: androidNative.Array<number>, start: number, end: number);
public constructor();
public hashCode(): number;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
public equals(o: any): boolean;
public toString(): string;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace internal {
export class FastBlur {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.internal.FastBlur>;
public constructor();
public static blur(bitmap: globalAndroid.graphics.Bitmap, p: number, sir: boolean): globalAndroid.graphics.Bitmap;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace internal {
export class RSBlur {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.internal.RSBlur>;
public constructor();
public static blur(context: globalAndroid.content.Context, bitmap: globalAndroid.graphics.Bitmap, radius: number): globalAndroid.graphics.Bitmap;
}
}
}
}
}
}
declare namespace jp {
export namespace wasabeef {
export namespace glide {
export namespace transformations {
export namespace internal {
export class Utils {
public static class: java.lang.Class<jp.wasabeef.glide.transformations.internal.Utils>;
public static toDp(px: number): number;
}
}
}
}
}
}
//Generics information:
/* eslint-disable @typescript-eslint/unified-signatures */
/* eslint-disable @typescript-eslint/adjacent-overload-signatures */
/* eslint-disable no-redeclare */
/// <reference path="android-declarations.d.ts"/>
declare namespace com {
export namespace bumptech {
export namespace glide {
export class GeneratedAppGlideModuleImpl {
public static class: java.lang.Class<com.bumptech.glide.GeneratedAppGlideModuleImpl>;
public applyOptions(context: globalAndroid.content.Context, builder: com.bumptech.glide.GlideBuilder): void;
public registerComponents(context: globalAndroid.content.Context, glide: com.bumptech.glide.Glide, registry: com.bumptech.glide.Registry): void;
public constructor(context: globalAndroid.content.Context);
public getExcludedModuleClasses(): java.util.Set<java.lang.Class<any>>;
public isManifestParsingEnabled(): boolean;
}
export class GeneratedRequestManagerFactory {
public static class: java.lang.Class<com.bumptech.glide.GeneratedRequestManagerFactory>;
public build(glide: com.bumptech.glide.Glide, lifecycle: com.bumptech.glide.manager.Lifecycle, treeNode: com.bumptech.glide.manager.RequestManagerTreeNode, context: globalAndroid.content.Context): com.bumptech.glide.RequestManager;
}
export namespace load {
export namespace engine {
export class CapturingEngineKeyFactory {
public static class: java.lang.Class<com.bumptech.glide.load.engine.CapturingEngineKeyFactory>;
public constructor(listener: com.bumptech.glide.load.engine.CapturingEngineKeyFactory.Listener);
}
export namespace CapturingEngineKeyFactory {
export class Listener {
public static class: java.lang.Class<com.bumptech.glide.load.engine.CapturingEngineKeyFactory.Listener>;
/**
* Constructs a new instance of the com.bumptech.glide.load.engine.CapturingEngineKeyFactory$Listener interface with the provided implementation.
* An empty constructor exists calling super().
*/
public constructor(implementation: {
onEngineKeyCreated(param0: com.bumptech.glide.load.Key, param1: any): void;
});
public constructor();
public onEngineKeyCreated(param0: com.bumptech.glide.load.Key, param1: any): void;
}
}
}
}
}
}
export namespace nativescript {
export namespace image {
export class CacheKeyStore {
public static class: java.lang.Class<com.nativescript.image.CacheKeyStore>;
public put(id: string, keys: com.nativescript.image.CacheKeyStore.StoredKeys): void;
public remove(id: string): void;
public get(id: string): com.nativescript.image.CacheKeyStore.StoredKeys;
public constructor();
}
export namespace CacheKeyStore {
export class StoredKeys {
public static class: java.lang.Class<com.nativescript.image.CacheKeyStore.StoredKeys>;
public sourceKey: com.bumptech.glide.load.Key;
public signature: com.bumptech.glide.load.Key;
public width: number;
public height: number;
public transformation: com.bumptech.glide.load.Transformation<any>;
public transformationKeyBytes: androidNative.Array<number>;
public decodedResourceClass: java.lang.Class<any>;
public options: com.bumptech.glide.load.Options;
public optionsKeyBytes: androidNative.Array<number>;
public engineKey: com.bumptech.glide.load.Key;
public constructor(sourceKey: com.bumptech.glide.load.Key, signature: com.bumptech.glide.load.Key, width: number, height: number, transformation: com.bumptech.glide.load.Transformation<any>, transformationKeyBytes: androidNative.Array<number>, decodedResourceClass: java.lang.Class<any>, options: com.bumptech.glide.load.Options, optionsKeyBytes: androidNative.Array<number>, engineKey: com.bumptech.glide.load.Key);
}
}
export class CompositeRequestListener<T> extends com.bumptech.glide.request.RequestListener<any> {
public static class: java.lang.Class<com.nativescript.image.CompositeRequestListener<any>>;
public constructor(listeners: androidNative.Array<com.bumptech.glide.request.RequestListener<any>>);
public onResourceReady(l: any, this_: any, resource: com.bumptech.glide.request.target.Target<any>, model: com.bumptech.glide.load.DataSource, target: boolean): boolean;
public onLoadFailed(l: com.bumptech.glide.load.engine.GlideException, this_: any, e: com.bumptech.glide.request.target.Target<any>, model: boolean): boolean;
}
export class ConditionalCrossFadeFactory extends com.bumptech.glide.request.transition.DrawableCrossFadeFactory {
public static class: java.lang.Class<com.nativescript.image.ConditionalCrossFadeFactory>;
public constructor(durationMs: number, onlyOnNetwork: boolean);
public build(dataSource: com.bumptech.glide.load.DataSource, isFirstResource: boolean): com.bumptech.glide.request.transition.Transition<globalAndroid.graphics.drawable.Drawable>;
}
export class CustomDataFetcher extends com.bumptech.glide.load.data.DataFetcher<java.io.InputStream> {
public static class: java.lang.Class<com.nativescript.image.CustomDataFetcher>;
public loadData(clientBuilder: com.bumptech.glide.Priority, clientBuilder_1: com.bumptech.glide.load.data.DataFetcher.DataCallback<any>): void;
public cleanup(): void;
public getDataClass(): java.lang.Class<java.io.InputStream>;
public cancel(): void;
public constructor(client: okhttp3.Call.Factory, url: com.nativescript.image.CustomGlideUrl);
public getDataSource(): com.bumptech.glide.load.DataSource;
}
export class CustomGlideModule {
public static class: java.lang.Class<com.nativescript.image.CustomGlideModule>;
public applyOptions(context: globalAndroid.content.Context, builder: com.bumptech.glide.GlideBuilder): void;
public registerComponents(this_: globalAndroid.content.Context, context: com.bumptech.glide.Glide, glide: com.bumptech.glide.Registry): void;
public constructor();
public isManifestParsingEnabled(): boolean;
}
export class CustomGlideUrl {
public static class: java.lang.Class<com.nativescript.image.CustomGlideUrl>;
public getLoadSourceCallback(): com.nativescript.image.ImageLoadSourceCallback;
public getProgressCallback(): com.nativescript.image.ImageProgressCallback;
public hasLoadSourceListener(): boolean;
public hasProgressListener(): boolean;
public constructor(url: string, headers: java.util.Map<string,string>, progressCallback: com.nativescript.image.ImageProgressCallback, loadSourceCallback: com.nativescript.image.ImageLoadSourceCallback);
}
export class CustomUrlLoader extends com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,java.io.InputStream> {
public static class: java.lang.Class<com.nativescript.image.CustomUrlLoader>;
public buildLoadData(this_: com.bumptech.glide.load.model.GlideUrl, model: number, width: number, height: com.bumptech.glide.load.Options): com.bumptech.glide.load.model.ModelLoader.LoadData<java.io.InputStream>;
public handles(model: com.bumptech.glide.load.model.GlideUrl): boolean;
public constructor(client: okhttp3.Call.Factory);
}
export namespace CustomUrlLoader {
export class Factory extends com.bumptech.glide.load.model.ModelLoaderFactory<com.bumptech.glide.load.model.GlideUrl,java.io.InputStream> {
public static class: java.lang.Class<com.nativescript.image.CustomUrlLoader.Factory>;
public constructor(client: okhttp3.OkHttpClient);
public build(multiFactory: com.bumptech.glide.load.model.MultiModelLoaderFactory): com.bumptech.glide.load.model.ModelLoader<com.bumptech.glide.load.model.GlideUrl,java.io.InputStream>;
public teardown(): void;
}
}
export class EvictionManager {
public static class: java.lang.Class<com.nativescript.image.EvictionManager>;
public clearAll(): void;
public static get(): com.nativescript.image.EvictionManager;
public clearMemory(callback: com.nativescript.image.EvictionManager.EvictionCallback): void;
public clearAll(callback: com.nativescript.image.EvictionManager.EvictionCallback): void;
public evictAllForId(id: string, callback: com.nativescript.image.EvictionManager.EvictionCallback): void;
public saveKeys(toPersist: string, t: com.nativescript.image.CacheKeyStore.StoredKeys): void;
public clearDiskCache(callback: com.nativescript.image.EvictionManager.EvictionCallback): void;
public evictMemoryForId(e: string, this_: com.nativescript.image.EvictionManager.EvictionCallback): void;
public setDiskCache(diskCache: com.bumptech.glide.load.engine.cache.DiskCache): void;
public isInMemoryCache(this_: string): boolean;
public evictAllForId(id: string): void;
public evictSourceForId(id: string, callback: com.nativescript.image.EvictionManager.EvictionCallback): void;
public evictDiskForId(this_: string, id: com.nativescript.image.EvictionManager.EvictionCallback): void;
public isInDiskCacheBlocking(resourceKey: string): androidNative.Array<boolean>;
public clearDiskCache(): void;
public evictDiskForId(id: string): void;
public evictTransformedForId(id: string, callback: com.nativescript.image.EvictionManager.EvictionCallback): void;
public isInDiskCacheAsync(id: string, callback: com.nativescript.image.EvictionManager.DiskPresenceCallback): void;
public setPersistentStore(store: com.nativescript.image.SharedPrefCacheKeyStore): void;
public clearMemory(): void;
public setMemoryCache(memoryCache: com.bumptech.glide.load.engine.cache.LruResourceCache): void;
public getKeyStore(): com.nativescript.image.CacheKeyStore;
}
export namespace EvictionManager {
export class DiskPresenceCallback {
public static class: java.lang.Class<com.nativescript.image.EvictionManager.DiskPresenceCallback>;
/**
* Constructs a new instance of the com.nativescript.image.EvictionManager$DiskPresenceCallback interface with the provided implementation.
* An empty constructor exists calling super().
*/
public constructor(implementation: {
onResult(param0: boolean, param1: boolean): void;
});
public constructor();
public onResult(param0: boolean, param1: boolean): void;
}
export class EvictionCallback {
public static class: java.lang.Class<com.nativescript.image.EvictionManager.EvictionCallback>;
/**
* Constructs a new instance of the com.nativescript.image.EvictionManager$EvictionCallback interface with the provided implementation.
* An empty constructor exists calling super().
*/
public constructor(implementation: {
onComplete(param0: boolean, param1: java.lang.Exception): void;
});
public constructor();
public onComplete(param0: boolean, param1: java.lang.Exception): void;
}
}
export class ExtractRequestOptions {
public static class: java.lang.Class<com.nativescript.image.ExtractRequestOptions>;
public static getFrom(optionsField: com.bumptech.glide.request.RequestOptions): com.bumptech.glide.load.Options;
public static clearCache(): void;
}
export class GlideApp {
public static class: java.lang.Class<com.nativescript.image.GlideApp>;
public static getPhotoCacheDir(context: globalAndroid.content.Context, string: string): java.io.File;
public static enableHardwareBitmaps(): void;
public static getPhotoCacheDir(context: globalAndroid.content.Context): java.io.File;
public static get(context: globalAndroid.content.Context): com.bumptech.glide.Glide;
public static with(view: globalAndroid.view.View): com.nativescript.image.GlideRequests;
public static with(context: globalAndroid.content.Context): com.nativescript.image.GlideRequests;
public static isInitialized(): void;
public static with(activity: androidx.fragment.app.FragmentActivity): com.nativescript.image.GlideRequests;
/** @deprecated */
public static with(fragment: globalAndroid.app.Fragment): com.nativescript.image.GlideRequests;
/** @deprecated */
public static init(glide: com.bumptech.glide.Glide): void;
public static with(fragment: androidx.fragment.app.Fragment): com.nativescript.image.GlideRequests;
/** @deprecated */
public static with(activity: globalAndroid.app.Activity): com.nativescript.image.GlideRequests;
public static init(context: globalAndroid.content.Context, builder: com.bumptech.glide.GlideBuilder): void;
public static tearDown(): void;
}
export class GlideOptions {
public static class: java.lang.Class<com.nativescript.image.GlideOptions>;
public static overrideOf(width: number, height: number): com.nativescript.image.GlideOptions;
public downsample(strategy: com.bumptech.glide.load.resource.bitmap.DownsampleStrategy): com.nativescript.image.GlideOptions;
public centerInside(): com.nativescript.image.GlideOptions;
public static circleCropTransform(): com.nativescript.image.GlideOptions;
public static frameOf(value: number): com.nativescript.image.GlideOptions;
public fitCenter(): com.nativescript.image.GlideOptions;
public onlyRetrieveFromCache(flag: boolean): com.nativescript.image.GlideOptions;
public error(id: number): com.nativescript.image.GlideOptions;
public static formatOf(format: com.bumptech.glide.load.DecodeFormat): com.nativescript.image.GlideOptions;
public constructor();
public optionalCircleCrop(): com.nativescript.image.GlideOptions;
public static encodeQualityOf(value: number): com.nativescript.image.GlideOptions;
public fallback(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideOptions;
public centerCrop(): com.nativescript.image.GlideOptions;
public static centerCropTransform(): com.nativescript.image.GlideOptions;
public static placeholderOf(id: number): com.nativescript.image.GlideOptions;
public static decodeTypeOf(clazz: java.lang.Class<any>): com.nativescript.image.GlideOptions;
public static bitmapTransform(transformation: com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>): com.nativescript.image.GlideOptions;
public clone(): com.nativescript.image.GlideOptions;
public useAnimationPool(flag: boolean): com.nativescript.image.GlideOptions;
public diskCacheStrategy(strategy: com.bumptech.glide.load.engine.DiskCacheStrategy): com.nativescript.image.GlideOptions;
public override(width: number, height: number): com.nativescript.image.GlideOptions;
public frame(value: number): com.nativescript.image.GlideOptions;
public signature(key: com.bumptech.glide.load.Key): com.nativescript.image.GlideOptions;
public static encodeFormatOf(format: globalAndroid.graphics.Bitmap.CompressFormat): com.nativescript.image.GlideOptions;
public static timeoutOf(value: number): com.nativescript.image.GlideOptions;
public static noTransformation(): com.nativescript.image.GlideOptions;
public fallback(id: number): com.nativescript.image.GlideOptions;
public static centerInsideTransform(): com.nativescript.image.GlideOptions;
public lock(): com.nativescript.image.GlideOptions;
public autoClone(): com.nativescript.image.GlideOptions;
public static overrideOf(size: number): com.nativescript.image.GlideOptions;
/** @deprecated */
public transforms(transformations: androidNative.Array<com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>>): com.nativescript.image.GlideOptions;
public static priorityOf(priority: com.bumptech.glide.Priority): com.nativescript.image.GlideOptions;
public static placeholderOf(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideOptions;
public decode(clazz: java.lang.Class<any>): com.nativescript.image.GlideOptions;
public set(option: com.bumptech.glide.load.Option, y: any): com.nativescript.image.GlideOptions;
public static signatureOf(key: com.bumptech.glide.load.Key): com.nativescript.image.GlideOptions;
public dontAnimate(): com.nativescript.image.GlideOptions;
public optionalTransform(clazz: java.lang.Class<any>, transformation: com.bumptech.glide.load.Transformation): com.nativescript.image.GlideOptions;
public transform(clazz: java.lang.Class<any>, transformation: com.bumptech.glide.load.Transformation): com.nativescript.image.GlideOptions;
public useUnlimitedSourceGeneratorsPool(flag: boolean): com.nativescript.image.GlideOptions;
public error(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideOptions;
public apply(options: com.bumptech.glide.request.BaseRequestOptions<any>): com.nativescript.image.GlideOptions;
public static diskCacheStrategyOf(strategy: com.bumptech.glide.load.engine.DiskCacheStrategy): com.nativescript.image.GlideOptions;
public encodeFormat(format: globalAndroid.graphics.Bitmap.CompressFormat): com.nativescript.image.GlideOptions;
public encodeQuality(value: number): com.nativescript.image.GlideOptions;
public static sizeMultiplierOf(value: number): com.nativescript.image.GlideOptions;
public sizeMultiplier(value: number): com.nativescript.image.GlideOptions;
public placeholder(id: number): com.nativescript.image.GlideOptions;
public optionalCenterCrop(): com.nativescript.image.GlideOptions;
public optionalCenterInside(): com.nativescript.image.GlideOptions;
public transform(transformation: com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>): com.nativescript.image.GlideOptions;
public static option(option: com.bumptech.glide.load.Option, t: any): com.nativescript.image.GlideOptions;
public override(size: number): com.nativescript.image.GlideOptions;
public circleCrop(): com.nativescript.image.GlideOptions;
public static skipMemoryCacheOf(skipMemoryCache: boolean): com.nativescript.image.GlideOptions;
public format(format: com.bumptech.glide.load.DecodeFormat): com.nativescript.image.GlideOptions;
public transform(transformations: androidNative.Array<com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>>): com.nativescript.image.GlideOptions;
public static errorOf(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideOptions;
public static errorOf(id: number): com.nativescript.image.GlideOptions;
public static fitCenterTransform(): com.nativescript.image.GlideOptions;
public optionalFitCenter(): com.nativescript.image.GlideOptions;
public placeholder(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideOptions;
public dontTransform(): com.nativescript.image.GlideOptions;
public static noAnimation(): com.nativescript.image.GlideOptions;
public priority(priority: com.bumptech.glide.Priority): com.nativescript.image.GlideOptions;
public static downsampleOf(strategy: com.bumptech.glide.load.resource.bitmap.DownsampleStrategy): com.nativescript.image.GlideOptions;
public skipMemoryCache(skip: boolean): com.nativescript.image.GlideOptions;
public timeout(value: number): com.nativescript.image.GlideOptions;
public optionalTransform(transformation: com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>): com.nativescript.image.GlideOptions;
public disallowHardwareConfig(): com.nativescript.image.GlideOptions;
public theme(theme: globalAndroid.content.res.Resources.Theme): com.nativescript.image.GlideOptions;
}
export class GlideRequest<TranscodeType> extends com.bumptech.glide.RequestBuilder<any> implements java.lang.Cloneable {
public static class: java.lang.Class<com.nativescript.image.GlideRequest<any>>;
public onlyRetrieveFromCache(flag: boolean): com.nativescript.image.GlideRequest<any>;
public load(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideRequest<any>;
public theme(theme: globalAndroid.content.res.Resources.Theme): com.nativescript.image.GlideRequest<any>;
public autoClone(): com.nativescript.image.GlideRequest<any>;
public getDownloadOnlyRequest(): com.nativescript.image.GlideRequest<java.io.File>;
public encodeQuality(value: number): com.nativescript.image.GlideRequest<any>;
public fitCenter(): com.nativescript.image.GlideRequest<any>;
public centerCrop(): com.nativescript.image.GlideRequest<any>;
public optionalCenterInside(): com.nativescript.image.GlideRequest<any>;
public downsample(strategy: com.bumptech.glide.load.resource.bitmap.DownsampleStrategy): com.nativescript.image.GlideRequest<any>;
public listener(listener: com.bumptech.glide.request.RequestListener<any>): com.nativescript.image.GlideRequest<any>;
public load(uri: globalAndroid.net.Uri): com.nativescript.image.GlideRequest<any>;
public placeholder(id: number): com.nativescript.image.GlideRequest<any>;
public lock(): com.nativescript.image.GlideRequest<any>;
public thumbnail(list: java.util.List<com.bumptech.glide.RequestBuilder<any>>): com.nativescript.image.GlideRequest<any>;
public transition(options: com.bumptech.glide.TransitionOptions<any,any>): com.nativescript.image.GlideRequest<any>;
public frame(value: number): com.nativescript.image.GlideRequest<any>;
public error(id: number): com.nativescript.image.GlideRequest<any>;
public sizeMultiplier(value: number): com.nativescript.image.GlideRequest<any>;
public error(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideRequest<any>;
public priority(priority: com.bumptech.glide.Priority): com.nativescript.image.GlideRequest<any>;
public optionalFitCenter(): com.nativescript.image.GlideRequest<any>;
public load(bitmap: globalAndroid.graphics.Bitmap): com.nativescript.image.GlideRequest<any>;
public centerInside(): com.nativescript.image.GlideRequest<any>;
public load(file: java.io.File): com.nativescript.image.GlideRequest<any>;
public decode(clazz: java.lang.Class<any>): com.nativescript.image.GlideRequest<any>;
public load(string: string): com.nativescript.image.GlideRequest<any>;
public transform(clazz: java.lang.Class<any>, transformation: com.bumptech.glide.load.Transformation): com.nativescript.image.GlideRequest<any>;
public dontAnimate(): com.nativescript.image.GlideRequest<any>;
public placeholder(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideRequest<any>;
public dontTransform(): com.nativescript.image.GlideRequest<any>;
public error(o: any): com.nativescript.image.GlideRequest<any>;
public transform(transformation: com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>): com.nativescript.image.GlideRequest<any>;
public format(format: com.bumptech.glide.load.DecodeFormat): com.nativescript.image.GlideRequest<any>;
public optionalTransform(transformation: com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>): com.nativescript.image.GlideRequest<any>;
public useAnimationPool(flag: boolean): com.nativescript.image.GlideRequest<any>;
public diskCacheStrategy(strategy: com.bumptech.glide.load.engine.DiskCacheStrategy): com.nativescript.image.GlideRequest<any>;
public override(size: number): com.nativescript.image.GlideRequest<any>;
public timeout(value: number): com.nativescript.image.GlideRequest<any>;
/** @deprecated */
public thumbnail(sizeMultiplier: number): com.nativescript.image.GlideRequest<any>;
public load(o: any): com.nativescript.image.GlideRequest<any>;
public skipMemoryCache(skip: boolean): com.nativescript.image.GlideRequest<any>;
public disallowHardwareConfig(): com.nativescript.image.GlideRequest<any>;
public apply(options: com.bumptech.glide.request.BaseRequestOptions<any>): com.nativescript.image.GlideRequest<any>;
public thumbnail(builders: androidNative.Array<com.bumptech.glide.RequestBuilder<any>>): com.nativescript.image.GlideRequest<any>;
public encodeFormat(format: globalAndroid.graphics.Bitmap.CompressFormat): com.nativescript.image.GlideRequest<any>;
public load(bytes: androidNative.Array<number>): com.nativescript.image.GlideRequest<any>;
public fallback(id: number): com.nativescript.image.GlideRequest<any>;
public error(builder: com.bumptech.glide.RequestBuilder<any>): com.nativescript.image.GlideRequest<any>;
public circleCrop(): com.nativescript.image.GlideRequest<any>;
public useUnlimitedSourceGeneratorsPool(flag: boolean): com.nativescript.image.GlideRequest<any>;
public fallback(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideRequest<any>;
public set(option: com.bumptech.glide.load.Option, y: any): com.nativescript.image.GlideRequest<any>;
public optionalCircleCrop(): com.nativescript.image.GlideRequest<any>;
public transform(transformations: androidNative.Array<com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>>): com.nativescript.image.GlideRequest<any>;
public thumbnail(builder: com.bumptech.glide.RequestBuilder<any>): com.nativescript.image.GlideRequest<any>;
/** @deprecated */
public transforms(transformations: androidNative.Array<com.bumptech.glide.load.Transformation<globalAndroid.graphics.Bitmap>>): com.nativescript.image.GlideRequest<any>;
public optionalCenterCrop(): com.nativescript.image.GlideRequest<any>;
public addListener(listener: com.bumptech.glide.request.RequestListener<any>): com.nativescript.image.GlideRequest<any>;
public override(width: number, height: number): com.nativescript.image.GlideRequest<any>;
public optionalTransform(clazz: java.lang.Class<any>, transformation: com.bumptech.glide.load.Transformation): com.nativescript.image.GlideRequest<any>;
/** @deprecated */
public load(url: java.net.URL): com.nativescript.image.GlideRequest<any>;
public signature(key: com.bumptech.glide.load.Key): com.nativescript.image.GlideRequest<any>;
public load(id: java.lang.Integer): com.nativescript.image.GlideRequest<any>;
public clone(): com.nativescript.image.GlideRequest<any>;
}
export class GlideRequests {
public static class: java.lang.Class<com.nativescript.image.GlideRequests>;
public setDefaultRequestOptions(options: com.bumptech.glide.request.RequestOptions): com.nativescript.image.GlideRequests;
public load(drawable: globalAndroid.graphics.drawable.Drawable): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public load(file: java.io.File): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public as(resourceClass: java.lang.Class<any>): com.nativescript.image.GlideRequest<any>;
public load(bitmap: globalAndroid.graphics.Bitmap): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public load(bytes: androidNative.Array<number>): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public setRequestOptions(toSet: com.bumptech.glide.request.RequestOptions): void;
/** @deprecated */
public load(url: java.net.URL): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public asBitmap(): com.nativescript.image.GlideRequest<globalAndroid.graphics.Bitmap>;
public load(o: any): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public download(o: any): com.nativescript.image.GlideRequest<java.io.File>;
public constructor(glide: com.bumptech.glide.Glide, lifecycle: com.bumptech.glide.manager.Lifecycle, treeNode: com.bumptech.glide.manager.RequestManagerTreeNode, context: globalAndroid.content.Context);
public load(id: java.lang.Integer): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public asGif(): com.nativescript.image.GlideRequest<com.bumptech.glide.load.resource.gif.GifDrawable>;
public clearOnStop(): com.nativescript.image.GlideRequests;
public downloadOnly(): com.nativescript.image.GlideRequest<java.io.File>;
public addDefaultRequestListener(listener: com.bumptech.glide.request.RequestListener<any>): com.nativescript.image.GlideRequests;
public load(uri: globalAndroid.net.Uri): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public asDrawable(): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
public applyDefaultRequestOptions(options: com.bumptech.glide.request.RequestOptions): com.nativescript.image.GlideRequests;
public asFile(): com.nativescript.image.GlideRequest<java.io.File>;
public load(string: string): com.nativescript.image.GlideRequest<globalAndroid.graphics.drawable.Drawable>;
}
export class ImageLoadSourceCallback {
public static class: java.lang.Class<com.nativescript.image.ImageLoadSourceCallback>;
/**
* Constructs a new instance of the com.nativescript.image.ImageLoadSourceCallback interface with the provided implementation.
* An empty constructor exists calling super().
*/
public constructor(implementation: {
onLoadStarted(param0: string, param1: string): void;
});
public constructor();
public onLoadStarted(param0: string, param1: string): void;
}
export class ImageProgressCallback {
public static class: java.lang.Class<com.nativescript.image.ImageProgressCallback>;
/**
* Constructs a new instance of the com.nativescript.image.ImageProgressCallback interface with the provided implementation.
* An empty constructor exists calling super().
*/
public constructor(implementation: {
onProgress(param0: string, param1: number, param2: number): void;
});
public constructor();
public onProgress(param0: string, param1: number, param2: number): void;
}
export class LoadSourceInterceptor {
public static class: java.lang.Class<com.nativescript.image.LoadSourceInterceptor>;
public constructor(url: string, callback: com.nativescript.image.ImageLoadSourceCallback);
public intercept(chain: okhttp3.Interceptor.Chain): okhttp3.Response;
}
export class MatrixDrawable {
public static class: java.lang.Class<com.nativescript.image.MatrixDrawable>;
public draw(canvas: globalAndroid.graphics.Canvas): void;
public unscheduleDrawable(who: globalAndroid.graphics.drawable.Drawable, what: java.lang.Runnable): void;
public constructor(wrapped: globalAndroid.graphics.drawable.Drawable);
public scheduleDrawable(who: globalAndroid.graphics.drawable.Drawable, what: java.lang.Runnable, when: number): void;
public setColorFilter(colorFilter: globalAndroid.graphics.ColorFilter): void;
public invalidateDrawable(who: globalAndroid.graphics.drawable.Drawable): void;
public setVisible(visible: boolean, restart: boolean): boolean;
public setMatrix(matrix: globalAndroid.graphics.Matrix): void;
public refreshWrappedCallback(): void;
public onBoundsChange(bounds: globalAndroid.graphics.Rect): void;
public getIntrinsicWidth(): number;
public stop(): void;
public getIntrinsicHeight(): number;
public start(): void;
public getOutline(outline: any): void;
public isRunning(): boolean;
public setBounds(left: number, top: number, right: number, bottom: number): void;
public setAlpha(alpha: number): void;
public getOpacity(): number;
}
export class MatrixDrawableImageViewTarget extends com.bumptech.glide.request.target.ViewTarget<globalAndroid.widget.ImageView,globalAndroid.graphics.drawable.Drawable> implements com.bumptech.glide.request.transition.Transition.ViewAdapter {
public static class: java.lang.Class<com.nativescript.image.MatrixDrawableImageViewTarget>;
public constructor(view: globalAndroid.widget.ImageView);
public getCurrentDrawable(): globalAndroid.graphics.drawable.Drawable;
public onLoadCleared(placeholder: globalAndroid.graphics.drawable.Drawable): void;
public onLoadStarted(placeholder: globalAndroid.graphics.drawable.Drawable): void;
public onLoadFailed(errorDrawable: globalAndroid.graphics.drawable.Drawable): void;
public onStart(): void;
public onResourceReady(resource: globalAndroid.graphics.drawable.Drawable, transition: com.bumptech.glide.request.transition.Transition<any>): void;
public setResource(resource: globalAndroid.graphics.drawable.Drawable): void;
public onStop(): void;
/** @deprecated */
public constructor(view: globalAndroid.widget.ImageView, waitForLayout: boolean);
public setDrawable(drawable: globalAndroid.graphics.drawable.Drawable): void;
}
export class MatrixImageView extends androidx.appcompat.widget.AppCompatImageView {
public static class: java.lang.Class<com.nativescript.image.MatrixImageView>;
public mBaseMatrix: globalAndroid.graphics.Matrix;
public mExtraMatrix: globalAndroid.graphics.Matrix;
public isUsingOutlineProvider: boolean;
public constructor(context: globalAndroid.content.Context);
public cancelRotationAnimation(): void;
public setImageRotation(degrees: number): void;
public ensureCurrentScaleInBounds(): void;
public resetInteraction(): void;
public constructor(context: globalAndroid.content.Context, attrs: globalAndroid.util.AttributeSet);
public setImageSize(width: number, height: number): void;
public getImageHeight(): number;
public setAspectRatio(aspectRatio: number): void;
public clearImageSize(): void;
public setNoRatioEnforce(noRatioEnforce: boolean): void;
public updateOutlineProvider(): void;
public isNoRatioEnforce(): boolean;
public onMeasure(ih: number, d: number): void;
public onVisibilityChanged(changedView: globalAndroid.view.View, visibility: number): void;
public setBackground(background: globalAndroid.graphics.drawable.Drawable): void;
public animateImageRotation(toDegrees: number, durationMs: number): void;
public getAspectRatio(): number;
public constructor(context: globalAndroid.content.Context, attrs: globalAndroid.util.AttributeSet, defStyleAttr: number);
public setScaleType(scaleType: globalAndroid.widget.ImageView.ScaleType): void;
public setImageDrawable(iw: globalAndroid.graphics.drawable.Drawable): void;
public onDetachedFromWindow(): void;
public getImageRotation(): number;
public setExtraTransform(extra: globalAndroid.graphics.Matrix): void;
public onSizeChanged(w: number, h: number, oldw: number, oldh: number): void;
public getImageWidth(): number;
public onAttachedToWindow(): void;
public onDraw(saveCount: globalAndroid.graphics.Canvas): void;
}
export class ProgressInterceptor {
public static class: java.lang.Class<com.nativescript.image.ProgressInterceptor>;
public intercept(chain: okhttp3.Interceptor.Chain): okhttp3.Response;
public constructor(url: string, callback: com.nativescript.image.ImageProgressCallback);
}
export class ProgressResponseBody {
public static class: java.lang.Class<com.nativescript.image.ProgressResponseBody>;
public constructor(responseBody: okhttp3.ResponseBody, url: string, callback: com.nativescript.image.ImageProgressCallback);
public contentLength(): number;
public source(): okio.BufferedSource;
public contentType(): okhttp3.MediaType;
}
export class RecordingDigest {
public static class: java.lang.Class<com.nativescript.image.RecordingDigest>;
public engineUpdate(input: number): void;
public engineUpdate(input: androidNative.Array<number>, offset: number, len: number): void;
public engineDigest(): androidNative.Array<number>;
public engineReset(): void;
public constructor();
}
export class RecreatedResourceKey {
public static class: java.lang.Class<com.nativescript.image.RecreatedResourceKey>;
public hashCode(): number;
public constructor(sourceKey: com.bumptech.glide.load.Key, signature: com.bumptech.glide.load.Key, width: number, height: number, transformationKeyBytes: androidNative.Array<number>, decodedResourceClass: java.lang.Class<any>, optionsKeyBytes: androidNative.Array<number>);
public equals(o: any): boolean;
public updateDiskCacheKey(messageDigest: java.security.MessageDigest): void;
}
export class SaveKeysRequestListener extends com.bumptech.glide.request.RequestListener<globalAndroid.graphics.drawable.Drawable> {
public static class: java.lang.Class<com.nativescript.image.SaveKeysRequestListener>;
public constructor(id: string, model: any, sourceKey: com.bumptech.glide.load.Key, signature: com.bumptech.glide.load.Key, width: number, height: number, transformation: com.bumptech.glide.load.Transformation<any>, options: com.bumptech.glide.request.RequestOptions, decodedResourceClass: java.lang.Class<any>);
public onLoadFailed(e: com.bumptech.glide.load.engine.GlideException, model: any, target: com.bumptech.glide.request.target.Target<globalAndroid.graphics.drawable.Drawable>, isFirstResource: boolean): boolean;
public onResourceReady(t: globalAndroid.graphics.drawable.Drawable, rd2: any, t_1: com.bumptech.glide.request.target.Target<globalAndroid.graphics.drawable.Drawable>, existing: com.bumptech.glide.load.DataSource, t_2: boolean): boolean;
}
export class ScaleUtils {
public static class: java.lang.Class<com.nativescript.image.ScaleUtils>;
public static getImageMatrix(scale: globalAndroid.graphics.drawable.Drawable, scale_1: number, scale_2: number, scale_3: number, d: globalAndroid.widget.ImageView.ScaleType, viewWidth: globalAndroid.graphics.Matrix): void;
}
export class SharedPrefCacheKeyStore {
public static class: java.lang.Class<com.nativescript.image.SharedPrefCacheKeyStore>;
public constructor(context: globalAndroid.content.Context);
public put(this_: string, id: com.nativescript.image.CacheKeyStore.StoredKeys): void;
public remove(id: string): void;
public get(source: string): com.nativescript.image.CacheKeyStore.StoredKeys;
}
}
}
}
+7
-0

@@ -6,2 +6,9 @@ # Change Log

## [5.0.0](https://github.com/nativescript-community/ui-image/compare/v4.6.6...v5.0.0) (2025-11-25)
### Features
* **android:** plugin now uses Glide. Comes with many new features ( alwaysFade, progress event, loadSource event, improved ZoomImage...) ([cb75fa9](https://github.com/nativescript-community/ui-image/commit/cb75fa9b32102d9a4cceedbb1fe982d71d47b3c6))
* **ios:** updated SDWebImage, progress and loadSource events ([989cda4](https://github.com/nativescript-community/ui-image/commit/989cda47b02f0f49d2f0f6d512481511b9669ce8))
## [4.6.6](https://github.com/nativescript-community/ui-image/compare/v4.6.5...v4.6.6) (2025-11-21)

@@ -8,0 +15,0 @@

+47
-18

@@ -5,7 +5,48 @@ import { Color, CoreTypes, Property, View } from '@nativescript/core';

import { ImageSource } from '@nativescript/core/image-source';
import { Optional } from '@nativescript/core/utils/typescript-utils';
export declare function colorConverter(v: string | Color): Color;
export type EventData = Optional<IEventData, 'object'>;
export interface LoadSourceEventData extends EventData {
source?: string;
}
/**
* Instances of this class are provided to the handlers of the {@link finalImageSet}.
*/
export interface FinalEventData extends EventData {
/**
* Contains information about an image.
*/
imageInfo: ImageInfo;
android?: any;
ios?: any;
source?: string;
}
/**
* Instances of this class are provided to the handlers of the {@link intermediateImageSet}.
*/
export interface IntermediateEventData extends EventData {
/**
* Contains information about an image.
*/
imageInfo: ImageInfo;
}
/**
* Instances of this class are provided to the handlers of the {@link failure} and {@link intermediateImageFailed}.
*/
export interface FailureEventData extends EventData {
/**
* An object containing information about the status of the event.
*/
error: Error;
}
export interface ProgressEventData extends EventData {
progress?: number;
current?: number;
total?: number;
finished?: boolean;
}
export declare enum CLogTypes {
log = 0,
info = 1,
warning = 2,
warn = 2,
error = 3

@@ -46,14 +87,5 @@ }

export interface ImagePipelineConfigSetting {
isDownsampleEnabled?: boolean;
leakTracker?: any;
useOkhttp?: boolean;
usePersistentCacheKeyStore?: boolean;
globalSignatureKey?: string;
}
export declare class EventData implements IEventData {
private _eventName;
private _object;
get eventName(): string;
set eventName(value: string);
get object(): any;
set object(value: any);
}
export type Stretch = 'none' | 'fill' | 'aspectFill' | 'aspectFit';

@@ -69,4 +101,2 @@ export declare const srcProperty: Property<ImageBase, string | ImageSource | ImageAsset>;

export declare const localThumbnailPreviewsEnabledProperty: Property<ImageBase, boolean>;
export declare const showProgressBarProperty: Property<ImageBase, boolean>;
export declare const progressBarColorProperty: Property<ImageBase, Color>;
export declare const roundAsCircleProperty: Property<ImageBase, boolean>;

@@ -93,3 +123,3 @@ export declare const blurRadiusProperty: Property<ImageBase, number>;

export declare const animatedImageViewProperty: Property<ImageBase, boolean>;
export declare const needRequestImage: (target: any, propertyKey: string | Symbol, descriptor: PropertyDescriptor) => void;
export declare const needRequestImage: (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
export type BasicSrcType = string | ImageSource | ImageAsset;

@@ -104,3 +134,4 @@ export type SrcType = BasicSrcType | (() => BasicSrcType | PromiseLike<BasicSrcType>) | PromiseLike<BasicSrcType>;

static submitEvent: string;
static fetchingFromEvent: string;
static progressEvent: string;
static loadSourceEvent: string;
src: SrcType;

@@ -116,4 +147,2 @@ lowerResSrc: string;

localThumbnailPreviewsEnabled: boolean;
showProgressBar: boolean;
progressBarColor: Color | string;
roundAsCircle: boolean;

@@ -120,0 +149,0 @@ roundBottomRightRadius: number;

@@ -9,50 +9,2 @@ import { Color, Length, Property, Trace, View, booleanConverter } from '@nativescript/core';

}
function isNonNegativeFiniteNumber(value) {
return isFinite(value) && !isNaN(value) && value >= 0;
}
function parseThickness(value) {
if (typeof value === 'string') {
const arr = value.split(/[ ,]+/);
let top;
let right;
let bottom;
let left;
if (arr.length === 1) {
top = arr[0];
right = arr[0];
bottom = arr[0];
left = arr[0];
}
else if (arr.length === 2) {
top = arr[0];
bottom = arr[0];
right = arr[1];
left = arr[1];
}
else if (arr.length === 3) {
top = arr[0];
right = arr[1];
left = arr[1];
bottom = arr[2];
}
else if (arr.length === 4) {
top = arr[0];
right = arr[1];
bottom = arr[2];
left = arr[3];
}
else {
throw new Error('Expected 1, 2, 3 or 4 parameters. Actual: ' + value);
}
return {
top,
right,
bottom,
left
};
}
else {
return value;
}
}
export var CLogTypes;

@@ -62,3 +14,3 @@ (function (CLogTypes) {

CLogTypes[CLogTypes["info"] = 1] = "info";
CLogTypes[CLogTypes["warning"] = 2] = "warning";
CLogTypes[CLogTypes["warn"] = 2] = "warn";
CLogTypes[CLogTypes["error"] = 3] = "error";

@@ -108,16 +60,2 @@ })(CLogTypes || (CLogTypes = {}));

}
export class EventData {
get eventName() {
return this._eventName;
}
set eventName(value) {
this._eventName = value;
}
get object() {
return this._object;
}
set object(value) {
this._object = value;
}
}
export const srcProperty = new Property({ name: 'src' });

@@ -132,8 +70,6 @@ export const headersProperty = new Property({ name: 'headers' });

export const localThumbnailPreviewsEnabledProperty = new Property({ name: 'localThumbnailPreviewsEnabled', valueConverter: booleanConverter });
export const showProgressBarProperty = new Property({ name: 'showProgressBar', valueConverter: booleanConverter, defaultValue: false });
export const progressBarColorProperty = new Property({ name: 'progressBarColor', valueConverter: colorConverter });
export const roundAsCircleProperty = new Property({ name: 'roundAsCircle', valueConverter: booleanConverter, affectsLayout: isAndroid });
export const blurRadiusProperty = new Property({ name: 'blurRadius', valueConverter: (v) => parseFloat(v) });
export const blurDownSamplingProperty = new Property({ name: 'blurDownSampling', valueConverter: (v) => parseFloat(v) });
export const imageRotationProperty = new Property({ name: 'imageRotation', valueConverter: (v) => parseFloat(v), defaultValue: 0 });
export const imageRotationProperty = new Property({ name: 'imageRotation', valueConverter: (v) => parseFloat(v), defaultValue: 0, affectsLayout: true });
export const autoPlayAnimationsProperty = new Property({ name: 'autoPlayAnimations', valueConverter: booleanConverter });

@@ -317,3 +253,4 @@ export const tapToRetryEnabledProperty = new Property({ name: 'tapToRetryEnabled', valueConverter: booleanConverter });

ImageBase.submitEvent = 'submit';
ImageBase.fetchingFromEvent = 'fetchingFrom';
ImageBase.progressEvent = 'progress';
ImageBase.loadSourceEvent = 'loadSource';
srcProperty.register(ImageBase);

@@ -329,4 +266,2 @@ headersProperty.register(ImageBase);

localThumbnailPreviewsEnabledProperty.register(ImageBase);
showProgressBarProperty.register(ImageBase);
progressBarColorProperty.register(ImageBase);
roundAsCircleProperty.register(ImageBase);

@@ -351,4 +286,5 @@ roundTopLeftRadiusProperty.register(ImageBase);

noRatioEnforceProperty.register(ImageBase);
tintColorProperty.register(ImageBase);
// roundRadiusProperty.register(ImageBase as any);
// ImageBase.blendingModeProperty.register(ImageBase);
//# sourceMappingURL=index-common.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index-common.js","sourceRoot":"","sources":["../../src/image/index-common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAa,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKvG,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,MAAM,UAAU,cAAc,CAAC,CAAiB;IAC5C,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,CAAU,CAAC;IACtB,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC;AACD,SAAS,yBAAyB,CAAC,KAAa;IAC5C,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC1D,CAAC;AAOD,SAAS,cAAc,CAAC,KAAa;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEjC,IAAI,GAAW,CAAC;QAChB,IAAI,KAAa,CAAC;QAClB,IAAI,MAAc,CAAC;QACnB,IAAI,IAAY,CAAC;QAEjB,IAAI,GAA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AAS,CAAC,CAAC;AAC3C,iBAAiB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACtC,kDAAkD;AAElD,sDAAsD"}
export * from './index-common';
import { Background, Color, backgroundInternalProperty } from '@nativescript/core';
import { AnimatedImage, EventData, ImageBase, ImageError as ImageErrorBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting, SrcType, aspectRatioProperty, backgroundUriProperty, blurDownSamplingProperty, blurRadiusProperty, fadeDurationProperty, failureImageUriProperty, headersProperty, imageRotationProperty, lowerResSrcProperty, noRatioEnforceProperty, placeholderImageUriProperty, progressBarColorProperty, roundAsCircleProperty, roundBottomLeftRadiusProperty, roundBottomRightRadiusProperty, roundTopLeftRadiusProperty, roundTopRightRadiusProperty, showProgressBarProperty, srcProperty, stretchProperty, tintColorProperty } from './index-common';
import { ImageBase, ImageError as ImageErrorBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting, SrcType } from './index-common';
export declare function initialize(config?: ImagePipelineConfigSetting): void;
export declare function getImagePipeline(): ImagePipeline;
export declare function shutDown(): void;
export declare class ImagePipeline {
private _android;
toUri(value: string | android.net.Uri): globalAndroid.net.Uri;
toUri(value: string | android.net.Uri): string;
getCacheKey(uri: string, context: any): string;
isInDiskCache(uri: string | android.net.Uri): boolean;
isInDiskCache(uri: string | android.net.Uri): Promise<boolean>;
isInBitmapMemoryCache(uri: string | android.net.Uri): boolean;
evictFromMemoryCache(uri: string | android.net.Uri): void;
evictFromMemoryCache(uri: string | android.net.Uri): Promise<void>;
evictFromDiskCache(uri: string | android.net.Uri): Promise<void>;
evictFromCache(uri: string | android.net.Uri): Promise<void>;
clearCaches(): void;
clearMemoryCaches(): void;
clearDiskCaches(): void;
clearCaches(): Promise<void>;
clearMemoryCaches(): Promise<void>;
clearDiskCaches(): Promise<void>;
prefetchToDiskCache(uri: string): Promise<void>;

@@ -23,5 +19,5 @@ prefetchToMemoryCache(uri: string): Promise<void>;

get android(): any;
set android(value: any);
fetchImage(): void;
}
export declare function getImagePipeline(): ImagePipeline;
export declare function shutDown(): void;
export declare class ImageError implements ImageErrorBase {

@@ -42,4 +38,5 @@ private _stringValue;

export declare class ImageInfo implements ImageInfoBase {
private _nativeImageInfo;
constructor(imageInfo: any);
private _width;
private _height;
constructor(width: number, height: number);
getHeight(): number;

@@ -49,54 +46,30 @@ getWidth(): number;

}
export declare class FinalEventData extends EventData {
private _imageInfo;
private _animatable;
get imageInfo(): ImageInfo;
set imageInfo(value: ImageInfo);
get animatable(): AnimatedImage;
set animatable(value: AnimatedImage);
get android(): AnimatedImage;
}
export declare class IntermediateEventData extends EventData {
private _imageInfo;
get imageInfo(): ImageInfo;
set imageInfo(value: ImageInfo);
}
export declare const needUpdateHierarchy: (targetOrNeedsLayout: any, propertyKey?: string | Symbol, descriptor?: PropertyDescriptor) => any;
export declare const needUpdateHierarchy: (targetOrNeedsLayout: any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor) => any;
export declare class Img extends ImageBase {
[placeholderImageUriProperty.setNative]: () => void;
[failureImageUriProperty.setNative]: () => void;
[stretchProperty.setNative]: () => void;
[fadeDurationProperty.setNative]: () => void;
[backgroundUriProperty.setNative]: () => void;
[showProgressBarProperty.setNative]: () => void;
[progressBarColorProperty.setNative]: () => void;
[roundAsCircleProperty.setNative]: () => void;
[roundTopLeftRadiusProperty.setNative]: () => void;
[imageRotationProperty.setNative]: (value: any) => void;
[roundTopRightRadiusProperty.setNative]: () => void;
[roundBottomLeftRadiusProperty.setNative]: () => void;
[roundBottomRightRadiusProperty.setNative]: () => void;
[tintColorProperty.setNative]: (value: Color) => void;
[blurRadiusProperty.setNative]: () => void;
[srcProperty.setNative]: () => void;
[lowerResSrcProperty.setNative]: () => void;
[blurDownSamplingProperty.setNative]: () => void;
[aspectRatioProperty.setNative]: () => void;
[headersProperty.setNative]: (value: any) => void;
[backgroundInternalProperty.setNative]: (value: Background) => void;
[noRatioEnforceProperty.setNative]: (value: boolean) => void;
nativeViewProtected: com.nativescript.image.DraweeView;
nativeImageViewProtected: com.nativescript.image.DraweeView;
isLoading: boolean;
[key: symbol]: (...args: any[]) => any | void;
nativeViewProtected: com.nativescript.image.MatrixImageView;
nativeImageViewProtected: com.nativescript.image.MatrixImageView;
mCanUpdateHierarchy: boolean;
mNeedUpdateHierarchy: boolean;
mNeedUpdateLayout: boolean;
private currentTarget;
private isNetworkRequest;
private progressCallback;
private loadSourceCallback;
onResumeNativeUpdates(): void;
createNativeView(): com.nativescript.image.DraweeView;
updateViewSize(imageInfo: any): void;
createNativeView(): com.nativescript.image.MatrixImageView;
disposeNativeView(): void;
get cacheKey(): string | globalAndroid.net.Uri;
get cacheKey(): string;
updateImageUri(): Promise<void>;
controllerListener: com.facebook.drawee.controller.ControllerListener<com.facebook.imagepipeline.image.ImageInfo>;
requestListener: com.facebook.imagepipeline.listener.RequestListener;
private loadImageWithGlide;
private notifyLoadSource;
notifyProgress(payload: {
loaded: number;
total: number;
progress: number;
finished: boolean;
}): void;
private notifyFinalImageSet;
private notifyFailure;
private getAnimatable;
protected handleImageSrc(src: SrcType): Promise<void>;

@@ -103,0 +76,0 @@ protected initImage(): Promise<void>;

@@ -1,9 +0,12 @@

var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
export * from './index-common';
import { Application, ImageAsset, ImageSource, Trace, Utils, backgroundInternalProperty, knownFolders, path } from '@nativescript/core';
import { ImageAsset, ImageSource, Trace, Utils, backgroundInternalProperty, knownFolders, path } from '@nativescript/core';
import { isString } from '@nativescript/core/utils/types';
import { layout } from '@nativescript/core/utils/layout-helper';
import { CLog, CLogTypes, EventData, ImageBase, ScaleType, aspectRatioProperty, backgroundUriProperty, blurDownSamplingProperty, blurRadiusProperty, fadeDurationProperty, failureImageUriProperty, headersProperty, imageRotationProperty, lowerResSrcProperty, needRequestImage, noRatioEnforceProperty, placeholderImageUriProperty, progressBarColorProperty, roundAsCircleProperty, roundBottomLeftRadiusProperty, roundBottomRightRadiusProperty, roundTopLeftRadiusProperty, roundTopRightRadiusProperty, showProgressBarProperty, srcProperty, stretchProperty, tintColorProperty, wrapNativeException } from './index-common';
import { CLog, CLogTypes, ImageBase, ScaleType, aspectRatioProperty, backgroundUriProperty, blurDownSamplingProperty, blurRadiusProperty, decodeHeightProperty, decodeWidthProperty, fadeDurationProperty, failureImageUriProperty, headersProperty, imageRotationProperty, lowerResSrcProperty, needRequestImage, noRatioEnforceProperty, placeholderImageUriProperty, roundAsCircleProperty, roundBottomLeftRadiusProperty, roundBottomRightRadiusProperty, roundTopLeftRadiusProperty, roundTopRightRadiusProperty, srcProperty, stretchProperty, tintColorProperty, wrapNativeException } from './index-common';
let initialized = false;
let initializeConfig;
let glideInstance;
// global signature to invalidate all cache if needed by plugin
let signature;
const globalSignatureKey = 'v1';
export function initialize(config) {

@@ -13,142 +16,151 @@ if (!initialized) {

if (!context) {
initializeConfig = config;
return;
}
let builder;
const useOkhttp = config?.useOkhttp !== false;
if (useOkhttp) {
//@ts-ignore
let client;
//@ts-ignore
if (useOkhttp instanceof okhttp3.OkHttpClient) {
client = useOkhttp;
}
else {
//@ts-ignore
client = new okhttp3.OkHttpClient();
}
builder = com.facebook.imagepipeline.backends.okhttp3.OkHttpImagePipelineConfigFactory.newBuilder(context, client);
builder.setNetworkFetcher(new com.nativescript.image.OkHttpNetworkFetcher(client));
if (config?.usePersistentCacheKeyStore) {
const sharedStore = new com.nativescript.image.SharedPrefCacheKeyStore(context.getApplicationContext());
com.nativescript.image.EvictionManager.get().setPersistentStore(sharedStore);
}
else {
builder = com.facebook.imagepipeline.core.ImagePipelineConfig.newBuilder(context);
}
builder.setDownsampleEnabled(config?.isDownsampleEnabled === true);
if (config?.leakTracker) {
builder.setCloseableReferenceLeakTracker(config.leakTracker);
}
// builder.experiment().setNativeCodeDisabled(true);
const imagePipelineConfig = builder.build();
com.facebook.drawee.backends.pipeline.Fresco.initialize(context, imagePipelineConfig);
// bumping `v1` will invalidate all cache
signature = new com.bumptech.glide.signature.ObjectKey(config?.globalSignatureKey ?? globalSignatureKey);
initialized = true;
initializeConfig = null;
glideInstance = com.bumptech.glide.Glide.get(context);
com.nativescript.image.EvictionManager.get().clearAll();
// this is needed for further buildKey to trigger ...
com.bumptech.glide.Glide.with(context)
.load('toto?ts=' + Date().valueOf())
.apply(new com.bumptech.glide.request.RequestOptions().signature(new com.bumptech.glide.signature.ObjectKey(Date().valueOf())))
.preload();
// com.nativescript.image.EngineKeyFactoryMethodDumper.dumpKeyFactoryMethods(glideInstance);
// com.nativescript.image.ForcePreloadTest.forcePreloadAfterInjection(context, 'https://example.com/test-image.png');
}
}
let imagePineLine;
export function getImagePipeline() {
if (!imagePineLine) {
if (Application.android.nativeApp) {
const nativePipe = com.facebook.drawee.backends.pipeline.Fresco.getImagePipeline();
imagePineLine = new ImagePipeline();
imagePineLine.android = nativePipe;
}
}
return imagePineLine;
}
export function shutDown() {
if (!initialized) {
return;
}
initialized = false;
com.facebook.drawee.view.SimpleDraweeView.shutDown();
com.facebook.drawee.backends.pipeline.Fresco.shutDown();
}
function getUri(src, asNative = true) {
let uri;
let imagePath;
if (src instanceof ImageAsset) {
imagePath = src.android;
}
else {
imagePath = src;
}
if (Utils.isFileOrResourcePath(imagePath)) {
if (imagePath.indexOf(Utils.RESOURCE_PREFIX) === 0) {
const resName = imagePath.substring(Utils.RESOURCE_PREFIX.length);
const identifier = Utils.android.resources.getDrawableId(resName);
if (0 < identifier) {
const netUri = new android.net.Uri.Builder().scheme(com.facebook.common.util.UriUtil.LOCAL_RESOURCE_SCHEME).path(java.lang.String.valueOf(identifier)).build();
if (asNative) {
return netUri;
}
uri = netUri.toString();
}
}
else if (imagePath.indexOf('~/') === 0) {
uri = `file:${path.join(knownFolders.currentApp().path, imagePath.replace('~/', ''))}`;
}
else if (imagePath.indexOf('/') === 0) {
uri = `file:${imagePath}`;
}
}
else {
uri = imagePath;
}
return asNative ? android.net.Uri.parse(uri) : uri;
}
function isVectorDrawable(context, resId) {
const resources = context.getResources();
// VectorDrawable resources are usually stored as "drawable" in XML format
const value = new android.util.TypedValue();
resources.getValue(resId, value, true);
if (value.string.toString().endsWith('.xml')) {
// It's most likely a VectorDrawable
return true;
}
// If it's not a vector, it's probably a BitmapDrawable or another type
return false;
}
function getBitmapFromVectorDrawable(context, drawableId) {
const drawable = Utils.android.getApplicationContext().getDrawable(drawableId);
const bitmap = android.graphics.Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), android.graphics.Bitmap.Config.ARGB_8888);
const canvas = new android.graphics.Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
console.log('getBitmapFromVectorDrawable', bitmap, bitmap.getWidth(), bitmap.getHeight);
return new android.graphics.drawable.BitmapDrawable(context.getResources(), bitmap);
}
export class ImagePipeline {
toUri(value) {
if (value instanceof android.net.Uri) {
return value;
return value.toString();
}
return android.net.Uri.parse(value);
return value;
}
getCacheKey(uri, context) {
// iOS only
return uri;
}
isInDiskCache(uri) {
return this._android.isInDiskCacheSync(this.toUri(uri));
const url = this.toUri(uri);
return new Promise((resolve, reject) => {
com.nativescript.image.EvictionManager.get().isInDiskCacheAsync(url, new com.nativescript.image.EvictionManager.DiskPresenceCallback({
onResult(source, transform) {
resolve(source || transform);
}
}));
});
}
isInBitmapMemoryCache(uri) {
return this._android.isInBitmapMemoryCache(this.toUri(uri));
// Still not directly accessible, but we can check if it's registered
const url = this.toUri(uri);
return com.nativescript.image.EvictionManager.get().isInMemoryCache(url);
}
evictFromMemoryCache(uri) {
this._android.evictFromMemoryCache(this.toUri(uri));
const url = this.toUri(uri);
return new Promise((resolve, reject) => {
com.nativescript.image.EvictionManager.get().evictMemoryForId(url, new com.nativescript.image.EvictionManager.EvictionCallback({
onComplete(success, error) {
if (success) {
resolve();
}
else {
if (Trace.isEnabled()) {
CLog(CLogTypes.error, error);
}
reject(error);
}
}
}));
});
}
async evictFromDiskCache(uri) {
this._android.evictFromDiskCache(this.toUri(uri));
evictFromDiskCache(uri) {
const url = this.toUri(uri);
return new Promise((resolve, reject) => {
com.nativescript.image.EvictionManager.get().evictDiskForId(url, new com.nativescript.image.EvictionManager.EvictionCallback({
onComplete(success, error) {
if (success) {
resolve();
}
else {
if (Trace.isEnabled()) {
CLog(CLogTypes.error, error);
}
reject(error);
}
}
}));
});
}
async evictFromCache(uri) {
this._android.evictFromCache(this.toUri(uri));
evictFromCache(uri) {
const url = this.toUri(uri);
return new Promise((resolve, reject) => {
com.nativescript.image.EvictionManager.get().evictAllForId(url, new com.nativescript.image.EvictionManager.EvictionCallback({
onComplete(success, error) {
if (success) {
resolve();
}
else {
if (Trace.isEnabled()) {
CLog(CLogTypes.error, error);
}
reject(error);
}
}
}));
});
}
clearCaches() {
this._android.clearCaches();
return new Promise((resolve, reject) => {
com.nativescript.image.EvictionManager.get().clearAll(new com.nativescript.image.EvictionManager.EvictionCallback({
onComplete(success, error) {
if (success) {
resolve();
}
else {
if (Trace.isEnabled()) {
CLog(CLogTypes.error, error);
}
reject(error);
}
}
}));
});
}
clearMemoryCaches() {
this._android.clearMemoryCaches();
return new Promise((resolve, reject) => {
com.nativescript.image.EvictionManager.get().clearMemory(new com.nativescript.image.EvictionManager.EvictionCallback({
onComplete(success, error) {
if (success) {
resolve();
}
else {
if (Trace.isEnabled()) {
CLog(CLogTypes.error, error);
}
reject(error);
}
}
}));
});
}
clearDiskCaches() {
this._android.clearDiskCaches();
return new Promise((resolve, reject) => {
com.nativescript.image.EvictionManager.get().clearDiskCache(new com.nativescript.image.EvictionManager.EvictionCallback({
onComplete(success, error) {
if (success) {
resolve();
}
else {
if (Trace.isEnabled()) {
CLog(CLogTypes.error, error);
}
reject(error);
}
}
}));
});
}

@@ -159,3 +171,15 @@ prefetchToDiskCache(uri) {

prefetchToMemoryCache(uri) {
return this.prefetchToCache(uri, false);
return new Promise((resolve, reject) => {
try {
const context = Utils.android.getApplicationContext();
const requestManager = com.bumptech.glide.Glide.with(context);
// Preload into memory cache
requestManager.asBitmap().load(uri).preload();
// Give Glide time to load into memory
setTimeout(() => resolve(), 100);
}
catch (error) {
reject(error);
}
});
}

@@ -165,16 +189,11 @@ prefetchToCache(uri, toDiskCache) {

try {
const nativeUri = android.net.Uri.parse(uri);
const request = com.facebook.imagepipeline.request.ImageRequestBuilder.newBuilderWithSource(nativeUri).build();
let datasource;
const context = Utils.android.getApplicationContext();
const requestManager = com.bumptech.glide.Glide.with(context);
if (toDiskCache) {
datasource = this._android.prefetchToDiskCache(request, uri);
requestManager.downloadOnly().load(uri).submit();
}
else {
datasource = this._android.prefetchToBitmapCache(request, uri);
requestManager.asBitmap().load(uri).submit();
}
// initializeBaseDataSubscriber();
datasource.subscribe(new com.nativescript.image.BaseDataSubscriber(new com.nativescript.image.BaseDataSubscriberListener({
onFailure: reject,
onNewResult: resolve
})), com.facebook.common.executors.CallerThreadExecutor.getInstance());
resolve();
}

@@ -187,46 +206,52 @@ catch (error) {

get android() {
return this._android;
return glideInstance;
}
set android(value) {
this._android = value;
}
let imagePipeLine;
export function getImagePipeline() {
if (!imagePipeLine) {
imagePipeLine = new ImagePipeline();
}
fetchImage() {
// ImagePipeline imagePipeline = Fresco.getImagePipeline();
// ImageRequest imageRequest = ImageRequestBuilder
// .newBuilderWithSource(imageUri)
// .setRequestPriority(Priority.HIGH)
// .setLowestPermittedRequestLevel(ImageRequest.RequestLevel.FULL_FETCH)
// .build();
// DataSource<CloseableReference<CloseableImage>> dataSource =
// imagePipeline.fetchDecodedImage(imageRequest, mContext);
// try {
// dataSource.subscribe(new BaseBitmapDataSubscriber() {
// @Override
// public void onNewResultImpl(Bitmap bitmap) {
// if (bitmap == null) {
// Log.d(TAG, "Bitmap data source returned success, but bitmap null.");
// return;
// }
// // The bitmap provided to this method is only guaranteed to be around
// // for the lifespan of this method. The image pipeline frees the
// // bitmap's memory after this method has completed.
// //
// // This is fine when passing the bitmap to a system process as
// // Android automatically creates a copy.
// //
// // If you need to keep the bitmap around, look into using a
// // BaseDataSubscriber instead of a BaseBitmapDataSubscriber.
// }
// @Override
// public void onFailureImpl(DataSource dataSource) {
// // No cleanup required here
// }
// }, CallerThreadExecutor.getInstance());
// } finally {
// if (dataSource != null) {
// dataSource.close();
// }
// }
return imagePipeLine;
}
export function shutDown() {
if (!initialized) {
return;
}
initialized = false;
// Glide cleanup
const context = Utils.android.getApplicationContext();
if (context) {
com.bumptech.glide.Glide.get(context).clearMemory();
}
}
function getUri(src, asNative = true) {
let uri;
let imagePath;
if (src instanceof ImageAsset) {
imagePath = src.android;
}
else {
imagePath = src;
}
if (Utils.isFileOrResourcePath(imagePath)) {
if (imagePath.indexOf(Utils.RESOURCE_PREFIX) === 0) {
const resName = imagePath.substring(Utils.RESOURCE_PREFIX.length);
const identifier = Utils.android.resources.getDrawableId(resName);
if (0 < identifier) {
return `android.resource://${Utils.android.getApplicationContext().getPackageName()}/${identifier}`;
}
}
else if (imagePath.indexOf('~/') === 0) {
uri = `file://${path.join(knownFolders.currentApp().path, imagePath.replace('~/', ''))}`;
}
else if (imagePath.indexOf('/') === 0) {
uri = `file://${imagePath}`;
}
}
else {
uri = imagePath;
}
return uri;
}
export class ImageError {

@@ -249,40 +274,20 @@ constructor(throwable) {

export class ImageInfo {
constructor(imageInfo) {
this._nativeImageInfo = imageInfo;
constructor(width, height) {
this._width = width;
this._height = height;
}
getHeight() {
return this._nativeImageInfo.getHeight();
return this._height;
}
getWidth() {
return this._nativeImageInfo.getWidth();
return this._width;
}
getQualityInfo() {
return this._nativeImageInfo.getQualityInfo();
return {
getQuality: () => 1,
isOfFullQuality: () => true,
isOfGoodEnoughQuality: () => true
};
}
}
export class FinalEventData extends EventData {
get imageInfo() {
return this._imageInfo;
}
set imageInfo(value) {
this._imageInfo = value;
}
get animatable() {
return this._animatable;
}
set animatable(value) {
this._animatable = value;
}
get android() {
return this._animatable;
}
}
export class IntermediateEventData extends EventData {
get imageInfo() {
return this._imageInfo;
}
set imageInfo(value) {
this._imageInfo = value;
}
}
export const needUpdateHierarchy = function (targetOrNeedsLayout, propertyKey, descriptor) {

@@ -321,9 +326,11 @@ if (typeof targetOrNeedsLayout === 'boolean') {

super(...arguments);
this.isLoading = false;
this.mCanUpdateHierarchy = true;
this.mNeedUpdateHierarchy = false;
this.mNeedUpdateLayout = false;
this.currentTarget = null;
this.isNetworkRequest = false;
this.progressCallback = null;
this.loadSourceCallback = null;
}
onResumeNativeUpdates() {
// {N} suspends properties update on `_suspendNativeUpdates`. So we only need to do this in onResumeNativeUpdates
this.mCanUpdateHierarchy = false;

@@ -343,36 +350,9 @@ super.onResumeNativeUpdates();

if (!initialized) {
initialize(initializeConfig);
initialize();
}
const view = new com.nativescript.image.DraweeView(this._context);
// (view as any).setClipToBounds(false);
return view;
return new com.nativescript.image.MatrixImageView(this._context);
}
updateViewSize(imageInfo) {
const draweeView = this.nativeImageViewProtected;
if (!draweeView) {
return;
}
if (imageInfo != null) {
draweeView.imageWidth = imageInfo.getWidth();
draweeView.imageHeight = imageInfo.getHeight();
}
if (!this.aspectRatio && imageInfo != null) {
const ratio = imageInfo.getWidth() / imageInfo.getHeight();
draweeView.setAspectRatio(ratio);
}
else if (this.aspectRatio) {
draweeView.setAspectRatio(this.aspectRatio);
}
else {
draweeView.setAspectRatio(0);
}
}
// public initNativeView(): void {
// this.initDrawee();
// this.updateHierarchy();
// }
disposeNativeView() {
this.controllerListener = null;
this.requestListener = null;
// this.nativeImageViewProtected.setImageURI(null, null);
this.progressCallback = null;
this.loadSourceCallback = null;
}

@@ -391,6 +371,3 @@ get cacheKey() {

if (cacheKey) {
// const isInCache = imagePipeLine.isInBitmapMemoryCache(uri);
// // if (isInCache) {
await imagePipeLine.evictFromCache(cacheKey);
// }
}

@@ -406,56 +383,64 @@ this.handleImageSrc(null);

}
[_c = stretchProperty.setNative]() {
this.updateHierarchy();
[stretchProperty.setNative]() {
// Scale type
if (this.stretch) {
const scaleType = getScaleType(this.stretch);
if (scaleType) {
this.nativeViewProtected.setScaleType(scaleType);
}
}
}
[_d = fadeDurationProperty.setNative]() {
[_c = fadeDurationProperty.setNative]() {
this.updateHierarchy();
}
[_e = backgroundUriProperty.setNative]() {
[_d = backgroundUriProperty.setNative]() {
this.updateHierarchy();
}
[_f = showProgressBarProperty.setNative]() {
[_e = roundAsCircleProperty.setNative](value) {
this.updateHierarchy();
}
[_g = progressBarColorProperty.setNative]() {
[_f = roundTopLeftRadiusProperty.setNative]() {
this.updateHierarchy();
}
[_h = roundAsCircleProperty.setNative]() {
this.updateHierarchy();
[imageRotationProperty.setNative](value) {
this.nativeImageViewProtected?.setImageRotation(value);
}
[_j = roundTopLeftRadiusProperty.setNative]() {
[_g = roundTopRightRadiusProperty.setNative]() {
this.updateHierarchy();
}
[_k = imageRotationProperty.setNative](value) {
const scaleType = this.nativeImageViewProtected.getHierarchy().getActualImageScaleType();
scaleType['setImageRotation']?.(value);
this.nativeImageViewProtected.invalidate();
}
[_l = roundTopRightRadiusProperty.setNative]() {
[_h = roundBottomLeftRadiusProperty.setNative]() {
this.updateHierarchy();
}
[_m = roundBottomLeftRadiusProperty.setNative]() {
[_j = roundBottomRightRadiusProperty.setNative]() {
this.updateHierarchy();
}
[_o = roundBottomRightRadiusProperty.setNative]() {
this.updateHierarchy();
[tintColorProperty.setNative](value) {
if (this.nativeImageViewProtected) {
this.nativeImageViewProtected.setColorFilter(value?.android ?? -1, android.graphics.PorterDuff.Mode.MULTIPLY);
}
}
[_p = tintColorProperty.setNative](value) {
this.updateHierarchy();
[_k = blurRadiusProperty.setNative](value) {
this.initImage();
}
[_q = blurRadiusProperty.setNative]() {
[_l = srcProperty.setNative]() {
this.initImage();
}
[_r = srcProperty.setNative]() {
[_m = decodeWidthProperty.setNative]() {
this.initImage();
}
[_s = lowerResSrcProperty.setNative]() {
[_o = decodeHeightProperty.setNative]() {
this.initImage();
}
[_t = blurDownSamplingProperty.setNative]() {
[_p = lowerResSrcProperty.setNative]() {
this.initImage();
}
[_u = aspectRatioProperty.setNative]() {
[_q = blurDownSamplingProperty.setNative]() {
this.initImage();
}
[_v = headersProperty.setNative](value) {
[_r = aspectRatioProperty.setNative](value) {
if (this.nativeViewProtected) {
this.nativeViewProtected.setAspectRatio(value || 0);
}
}
[_s = headersProperty.setNative](value) {
this.initImage();

@@ -465,315 +450,352 @@ }

super[backgroundInternalProperty.setNative](value);
this.nativeViewProtected.setClipToOutline(value?.hasBorderRadius());
if (this.nativeViewProtected) {
this.nativeViewProtected.setClipToOutline(value?.hasBorderRadius());
}
}
[noRatioEnforceProperty.setNative](value) {
this.nativeViewProtected.noRatioEnforce = value;
if (this.nativeViewProtected) {
this.nativeViewProtected.setNoRatioEnforce(value);
}
}
async handleImageSrc(src) {
loadImageWithGlide(uri) {
const view = this.nativeViewProtected;
if (view) {
if (src instanceof Promise) {
this.handleImageSrc(await src);
return;
}
else if (typeof src === 'function') {
const newSrc = src();
if (newSrc instanceof Promise) {
await newSrc;
const context = this._context;
// Determine if this is a network request
this.isNetworkRequest = typeof uri === 'string' && (uri.startsWith('http://') || uri.startsWith('https://'));
let requestBuilder;
let loadModel = uri;
// Create callbacks separately based on what's needed
const needsProgress = this.isNetworkRequest && this.hasListeners(ImageBase.progressEvent);
const needsLoadSource = this.isNetworkRequest && this.hasListeners('loadSource');
// Create progress callback if needed (only for network requests with listener)
if (needsProgress) {
const owner = new WeakRef(this);
this.progressCallback = new com.nativescript.image.ImageProgressCallback({
onProgress(url, bytesRead, totalBytes) {
const instance = owner.get();
if (instance) {
const progress = totalBytes > 0 ? bytesRead / totalBytes : 0;
instance.notifyProgress({
loaded: bytesRead,
total: totalBytes,
progress,
finished: bytesRead >= totalBytes
});
}
}
this.handleImageSrc(newSrc);
return;
}
if (src) {
let drawable;
if (typeof src === 'string') {
// disabled for now: loading vector drawables
// if (src.indexOf(Utils.RESOURCE_PREFIX) === 0) {
// const identifier = Utils.android.resources.getDrawableId(src.substring(Utils.RESOURCE_PREFIX.length));
// if (identifier >= 0 && isVectorDrawable(this._context, identifier)) {
// drawable = getBitmapFromVectorDrawable(this._context, identifier);
// }
// } else
if (Utils.isFontIconURI(src)) {
const fontIconCode = src.split('//')[1];
if (fontIconCode !== undefined) {
// support sync mode only
const font = this.style.fontInternal;
const color = this.style.color;
drawable = new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), ImageSource.fromFontIconCodeSync(fontIconCode, font, color).android);
}
});
}
// Create load source callback if needed (separate from progress)
if (needsLoadSource) {
const owner = new WeakRef(this);
this.loadSourceCallback = new com.nativescript.image.ImageLoadSourceCallback({
onLoadStarted(url, source) {
const instance = owner.get();
if (instance) {
instance.notifyLoadSource(source);
}
}
else if (src instanceof ImageSource) {
drawable = new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), src.android);
this.updateViewSize(src.android);
});
}
// Use CustomGlideUrl if we need headers, progress, or load source
if (this.isNetworkRequest && (this.headers || this.progressCallback || this.loadSourceCallback)) {
const headersMap = new java.util.HashMap();
if (this.headers) {
for (const key in this.headers) {
headersMap.put(key, this.headers[key]);
}
if (drawable) {
const hierarchy = this.nativeImageViewProtected.getHierarchy();
hierarchy.setImage(drawable, 1, hierarchy.getFadeDuration() === 0);
return;
}
loadModel = new com.nativescript.image.CustomGlideUrl(uri, headersMap, this.progressCallback, // Can be null
this.loadSourceCallback // Can be null
);
}
requestBuilder = com.bumptech.glide.Glide.with(context).load(loadModel).signature(new com.bumptech.glide.signature.ObjectKey(Date().valueOf()));
// Apply transformations (blur, rounded corners, etc.)
const transformations = [];
if (this.blurRadius) {
transformations.push(new jp.wasabeef.glide.transformations.BlurTransformation(Math.round(this.blurRadius), this.blurDownSampling || 1));
}
if (this.roundAsCircle) {
transformations.push(new jp.wasabeef.glide.transformations.CropCircleTransformation());
}
else {
const topLeft = Utils.layout.toDevicePixels(this.roundTopLeftRadius || 0);
const topRight = Utils.layout.toDevicePixels(this.roundTopRightRadius || 0);
const bottomRight = Utils.layout.toDevicePixels(this.roundBottomRightRadius || 0);
const bottomLeft = Utils.layout.toDevicePixels(this.roundBottomLeftRadius || 0);
if (topLeft || topRight || bottomRight || bottomLeft) {
const radius = Math.max(topLeft, topRight, bottomRight, bottomLeft);
transformations.push(new jp.wasabeef.glide.transformations.RoundedCornersTransformation(Math.round(radius), 0, jp.wasabeef.glide.transformations.RoundedCornersTransformation.CornerType.ALL));
}
}
// Tint color
if (this.tintColor) {
transformations.push(new jp.wasabeef.glide.transformations.ColorFilterTransformation(this.tintColor.android));
}
let multiTransform;
if (transformations.length > 0) {
multiTransform = new com.bumptech.glide.load.MultiTransformation(java.util.Arrays.asList(transformations));
requestBuilder = requestBuilder.transform(multiTransform);
}
// Placeholder
if (this.placeholderImageUri) {
const placeholder = this.getDrawable(this.placeholderImageUri);
if (placeholder) {
requestBuilder = requestBuilder.placeholder(placeholder);
}
}
// Error image
if (this.failureImageUri) {
const error = this.getDrawable(this.failureImageUri);
if (error) {
requestBuilder = requestBuilder.error(error);
}
}
// Thumbnail
if (this.lowerResSrc) {
const lowerResUri = getUri(this.lowerResSrc);
if (lowerResUri) {
const thumbnailRequest = com.bumptech.glide.Glide.with(context).load(lowerResUri);
requestBuilder = requestBuilder.thumbnail(thumbnailRequest);
}
}
// Fade duration + conditional crossfade
if (this.fadeDuration > 0) {
const factory = new com.nativescript.image.ConditionalCrossFadeFactory(this.fadeDuration, !this.alwaysFade);
requestBuilder = requestBuilder.transition(com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade(factory));
}
// Cache settings
if (this.noCache) {
requestBuilder = requestBuilder.skipMemoryCache(true).diskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy.NONE);
}
// Decode size
if (this.decodeWidth || this.decodeHeight) {
const Target = com.bumptech.glide.request.target.Target;
const width = this.decodeWidth || Target.SIZE_ORIGINAL;
const height = this.decodeHeight || Target.SIZE_ORIGINAL;
if (width === Target.SIZE_ORIGINAL) {
requestBuilder = requestBuilder.override(height);
}
else if (height === Target.SIZE_ORIGINAL) {
requestBuilder = requestBuilder.override(width);
}
else {
requestBuilder = requestBuilder.override(width, height);
}
}
const owner = new WeakRef(this);
const sourceKey = new com.bumptech.glide.signature.ObjectKey(uri);
const objectArr = Array.create(com.bumptech.glide.request.RequestListener, 2);
const ro = new com.bumptech.glide.request.RequestOptions().signature(signature);
objectArr[0] = new com.nativescript.image.SaveKeysRequestListener(uri, uri, sourceKey, signature, this.decodeWidth || com.bumptech.glide.request.target.Target.SIZE_ORIGINAL, this.decodeHeight || com.bumptech.glide.request.target.Target.SIZE_ORIGINAL, multiTransform, ro, null);
objectArr[1] = new com.bumptech.glide.request.RequestListener({
onLoadFailed(e, model, target, isFirstResource) {
const instance = owner.get();
if (instance) {
instance.progressCallback = null; // Clean up
instance.loadSourceCallback = null;
instance.notifyFailure(e);
}
const uri = getUri(src);
if (!uri) {
console.error(`Error: 'src' not valid: ${src}`);
return;
}
if (this.noCache) {
// testing if is in cache is slow so lets remove without testing
// const imagePipeLine = getImagePipeline();
// const isInCache = imagePipeLine.isInBitmapMemoryCache(uri) || imagePipeLine.isInDiskCache(uri);
// if (isInCache) {
getImagePipeline().evictFromCache(uri);
// }
}
this.isLoading = true;
if (!this.controllerListener) {
const that = new WeakRef(this);
this.controllerListener = new com.facebook.drawee.controller.ControllerListener({
onFinalImageSet(id, imageInfo, animatable) {
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'onFinalImageSet', id, imageInfo, animatable);
return false;
},
onResourceReady(resource, model, target, dataSource, isFirstResource) {
const instance = owner.get();
if (instance) {
instance.progressCallback = null; // Clean up
instance.loadSourceCallback = null;
instance.notifyFinalImageSet(resource, dataSource);
// Handle auto-play for animated drawables
if (!instance.autoPlayAnimations && resource instanceof android.graphics.drawable.Animatable) {
setTimeout(() => {
resource.stop();
}, 0);
}
// Notify load source for cache hits (network notified by interceptor)
let source = 'local';
if (dataSource) {
try {
const sourceName = dataSource.name ? dataSource.name() : String(dataSource);
switch ((sourceName || '').toUpperCase()) {
case 'MEMORY_CACHE':
source = 'memory';
break;
case 'DATA_DISK_CACHE':
case 'RESOURCE_DISK_CACHE':
source = 'disk';
break;
case 'REMOTE':
source = 'network';
break;
case 'LOCAL':
source = 'local';
break;
}
const owner = that?.get();
if (owner) {
owner.updateViewSize(imageInfo);
owner.isLoading = false;
const eventName = ImageBase.finalImageSetEvent;
if (owner.hasListeners(eventName)) {
const info = new ImageInfo(imageInfo);
owner.notify({
eventName,
imageInfo: info,
animatable: animatable
});
}
}
},
onFailure(id, throwable) {
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'onFailure', id, throwable.getLocalizedMessage());
}
const owner = that?.get();
if (owner) {
// const nView = nativeView.nativeViewProtected;
owner.isLoading = false;
const eventName = ImageBase.failureEvent;
if (owner.hasListeners(eventName)) {
const imageError = new ImageError(throwable);
owner.notify({
eventName,
error: wrapNativeException(throwable)
});
}
}
},
onIntermediateImageFailed(id, throwable) {
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'onIntermediateImageFailed', id, throwable);
}
const owner = that?.get();
if (owner) {
const eventName = ImageBase.intermediateImageFailedEvent;
if (owner.hasListeners(eventName)) {
owner.notify({
eventName,
error: wrapNativeException(throwable)
});
}
}
},
onIntermediateImageSet(id, imageInfo) {
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'onIntermediateImageSet', id, imageInfo);
}
const owner = that?.get();
if (owner) {
owner.updateViewSize(imageInfo);
const eventName = ImageBase.intermediateImageSetEvent;
if (owner.hasListeners(eventName)) {
const info = new ImageInfo(imageInfo);
owner.notify({
eventName,
imageInfo: info
});
}
}
},
onRelease(id) {
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'onRelease', id);
}
const owner = that?.get();
if (owner) {
const eventName = ImageBase.releaseEvent;
if (owner.hasListeners(eventName)) {
owner.notify({
eventName
});
}
}
},
onSubmit(id, callerContext) {
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'onSubmit', id, callerContext);
}
const owner = that?.get();
const eventName = ImageBase.submitEvent;
if (owner?.hasListeners(eventName)) {
owner.notify({
eventName
});
}
}
});
catch (err) {
source = 'unknown';
}
}
// Only notify if not network (network already notified by interceptor)
if (source !== 'network' && instance.hasListeners('loadSource')) {
instance.notifyLoadSource(source);
}
}
if (!this.requestListener && this.hasListeners(ImageBase.fetchingFromEvent)) {
const that = new WeakRef(this);
this.requestListener = new com.facebook.imagepipeline.listener.RequestListener({
onRequestStart(request, callerContext, requestId, isPrefetch) {
},
onRequestSuccess(param0, param1, param2) { },
onRequestFailure(param0, param1, param2, param3) { },
onRequestCancellation(param0) { },
onProducerStart(param0, param1) { },
onProducerEvent(param0, param1, param2) { },
onProducerFinishWithSuccess(requestId, producerName, extraMap) {
const owner = that?.get();
const eventName = ImageBase.fetchingFromEvent;
if (owner?.hasListeners(eventName)) {
let source = 'local';
if (producerName.indexOf('Network') !== -1) {
source = 'network';
}
else if (producerName.indexOf('Cache') !== -1) {
source = 'cache';
}
owner.notify({
eventName,
source
});
}
},
onProducerFinishWithFailure(param0, param1, param2, param3) { },
onProducerFinishWithCancellation(param0, param1, param2) { },
onUltimateProducerReached(param0, param1, param2) { },
requiresExtraMap(param0) { return false; },
});
}
const options = JSON.stringify({
progressiveRenderingEnabled: this.blurRadius,
localThumbnailPreviewsEnabled: this.blurRadius,
decodeWidth: this.decodeWidth,
decodeHeight: this.decodeHeight,
blurRadius: this.blurRadius,
lowerResSrc: this.lowerResSrc ? getUri(this.lowerResSrc, false) : undefined,
blurDownSampling: this.blurDownSampling,
autoPlayAnimations: this.autoPlayAnimations,
tapToRetryEnabled: this.tapToRetryEnabled,
headers: this.headers
});
view.setUri(uri, options, this.controllerListener, this.requestListener);
// const async = this.loadMode === 'async';
// if (async) {
// const builder = com.facebook.drawee.backends.pipeline.Fresco.newDraweeControllerBuilder();
// builder.setImageRequest(request);
// builder.setCallerContext(src);
// builder.setControllerListener(listener);
// builder.setOldController(this.nativeImageViewProtected.getController());
// if (Trace.isEnabled()) {
// builder.setPerfDataListener(
// new com.facebook.drawee.backends.pipeline.info.ImagePerfDataListener({
// onImageLoadStatusUpdated(param0: com.facebook.drawee.backends.pipeline.info.ImagePerfData, param1: number) {
// CLog(CLogTypes.info, 'onImageLoadStatusUpdated', param0, param1);
// },
// onImageVisibilityUpdated(param0: com.facebook.drawee.backends.pipeline.info.ImagePerfData, param1: number) {
// CLog(CLogTypes.info, 'onImageVisibilityUpdated', param0, param1);
// }
// })
// );
// }
// if (this.lowerResSrc) {
// builder.setLowResImageRequest(com.facebook.imagepipeline.request.ImageRequest.fromUri(getUri(this.lowerResSrc)));
// }
// if (this.autoPlayAnimations) {
// builder.setAutoPlayAnimations(this.autoPlayAnimations);
// }
// if (this.tapToRetryEnabled) {
// builder.setTapToRetryEnabled(this.tapToRetryEnabled);
// }
// const controller = builder.build();
// this.nativeImageViewProtected.setController(controller);
// } else {
// const dataSource = com.facebook.drawee.backends.pipeline.Fresco.getImagePipeline().fetchDecodedImage(request, src);
// const result = com.facebook.datasource.DataSources.waitForFinalResult(dataSource);
// const bitmap = result.get().underlyingBitmap;
// CloseableReference.closeSafely(result);
// dataSource.close();
// }
return false;
}
else {
this.nativeImageViewProtected.setController(null);
this.nativeImageViewProtected.setImageBitmap(null);
});
this.currentTarget = new com.nativescript.image.MatrixDrawableImageViewTarget(view);
requestBuilder.signature(signature).listener(new com.nativescript.image.CompositeRequestListener(objectArr)).into(this.currentTarget);
}
notifyLoadSource(source) {
const eventName = ImageBase.loadSourceEvent;
if (this.hasListeners(eventName)) {
this.notify({
eventName,
source // 'network', 'memory', 'disk', 'local'
});
}
}
notifyProgress(payload) {
const eventName = ImageBase.progressEvent;
if (this.hasListeners(eventName)) {
this.notify({
eventName,
current: payload.loaded,
total: payload.total,
progress: payload.progress,
finished: payload.finished
});
}
}
notifyFinalImageSet(drawable, dataSource) {
let sourceLabel = 'local';
if (dataSource) {
try {
sourceLabel = dataSource.name ? dataSource.name() : String(dataSource);
}
catch (err) {
sourceLabel = String(dataSource);
}
switch ((sourceLabel || '').toUpperCase()) {
case 'MEMORY_CACHE':
sourceLabel = 'memory';
break;
case 'DATA_DISK_CACHE':
case 'RESOURCE_DISK_CACHE':
sourceLabel = 'disk';
break;
case 'REMOTE':
sourceLabel = 'network';
break;
case 'LOCAL':
sourceLabel = 'local';
break;
default:
break;
}
}
const eventName = ImageBase.finalImageSetEvent;
if (this.hasListeners(eventName)) {
const width = drawable ? drawable.getIntrinsicWidth() : 0;
const height = drawable ? drawable.getIntrinsicHeight() : 0;
const info = new ImageInfo(width, height);
this.notify({
eventName,
imageInfo: info,
animatable: this.getAnimatable(drawable),
android: drawable,
source: sourceLabel
});
}
}
async initImage() {
// this.nativeImageViewProtected.setImageURI(null);
this.handleImageSrc(this.src);
notifyFailure(error) {
const eventName = ImageBase.failureEvent;
if (this.hasListeners(eventName)) {
this.notify({
eventName,
error: error instanceof java.lang.Throwable ? wrapNativeException(error) : error
});
}
}
updateHierarchy() {
if (!this.mCanUpdateHierarchy) {
this.mNeedUpdateHierarchy = true;
getAnimatable(drawable) {
if (drawable && drawable instanceof android.graphics.drawable.Animatable) {
return drawable;
}
return null;
}
async handleImageSrc(src) {
const view = this.nativeViewProtected;
if (!view) {
return;
}
if (this.nativeImageViewProtected) {
let failureImageDrawable;
let placeholderImageDrawable;
let backgroundDrawable;
if (this.failureImageUri) {
failureImageDrawable = this.getDrawable(this.failureImageUri);
if (src instanceof Promise) {
this.handleImageSrc(await src);
return;
}
else if (typeof src === 'function') {
const newSrc = src();
if (newSrc instanceof Promise) {
await newSrc;
}
if (this.placeholderImageUri) {
placeholderImageDrawable = this.getDrawable(this.placeholderImageUri);
this.handleImageSrc(newSrc);
return;
}
if (src) {
let drawable;
if (typeof src === 'string') {
if (Utils.isFontIconURI(src)) {
const fontIconCode = src.split('//')[1];
if (fontIconCode !== undefined) {
const font = this.style.fontInternal;
const color = this.style.color;
drawable = new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), ImageSource.fromFontIconCodeSync(fontIconCode, font, color).android);
}
}
}
if (this.backgroundUri) {
backgroundDrawable = this.getDrawable(this.backgroundUri);
else if (src instanceof ImageSource) {
drawable = new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), src.android);
}
const builder = new GenericDraweeHierarchyBuilder();
if (this.failureImageUri && failureImageDrawable) {
builder.setFailureImage(failureImageDrawable, this.stretch);
if (drawable) {
view.setImageDrawable(drawable);
this.notifyFinalImageSet(drawable);
return;
}
if (this.tintColor) {
builder.setActualImageColorFilter(new android.graphics.PorterDuffColorFilter(this.tintColor.android, android.graphics.PorterDuff.Mode.MULTIPLY));
const uri = getUri(src);
if (!uri) {
console.error(`Error: 'src' not valid: ${src}`);
return;
}
if (this.placeholderImageUri && placeholderImageDrawable) {
builder.setPlaceholderImage(placeholderImageDrawable, this.stretch);
this.loadImageWithGlide(uri);
}
else {
// Clear existing request before removing the drawable
if (this.currentTarget) {
com.bumptech.glide.Glide.with(this._context).clear(this.currentTarget);
this.currentTarget = null;
}
if (this.stretch) {
builder.setActualImageScaleType(this.stretch, this.imageRotation);
else {
com.bumptech.glide.Glide.with(this._context).clear(view);
}
builder.setFadeDuration(this.fadeDuration || 0);
if (this.backgroundUri && backgroundDrawable) {
builder.setBackground(backgroundDrawable);
}
if (this.showProgressBar) {
builder.setProgressBarImage(this.progressBarColor?.hex, this.stretch);
}
if (this.roundAsCircle) {
builder.setRoundingParamsAsCircle();
}
const topLeftRadius = this.roundTopLeftRadius || 0;
const topRightRadius = this.roundTopRightRadius || 0;
const bottomRightRadius = this.roundBottomRightRadius || 0;
const bottomLeftRadius = this.roundBottomLeftRadius || 0;
if (topLeftRadius || topRightRadius || bottomRightRadius || bottomLeftRadius) {
builder.setCornersRadii(Utils.layout.toDevicePixels(topLeftRadius), Utils.layout.toDevicePixels(topRightRadius), Utils.layout.toDevicePixels(bottomRightRadius), Utils.layout.toDevicePixels(bottomLeftRadius));
}
this.nativeImageViewProtected.setHierarchy(builder.build());
if (!this.mNeedRequestImage) {
this.nativeImageViewProtected.setController(this.nativeImageViewProtected.getController());
}
view.setImageDrawable(null);
}
}
async initImage() {
try {
await this.handleImageSrc(this.src);
}
catch (error) {
console.error(error, error.stack);
}
}
updateHierarchy() {
if (!this.mCanUpdateHierarchy) {
this.mNeedUpdateHierarchy = true;
return;
}
// Force reload with new settings
if (this.nativeImageViewProtected && this.src) {
this.initImage();
}
}
getDrawable(path) {
let drawable;
if (typeof path === 'string') {

@@ -783,6 +805,5 @@ if (Utils.isFontIconURI(path)) {

if (fontIconCode !== undefined) {
// support sync mode only
const font = this.style.fontInternal;
const color = this.style.color;
drawable = new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), ImageSource.fromFontIconCodeSync(fontIconCode, font, color).android);
return new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), ImageSource.fromFontIconCodeSync(fontIconCode, font, color).android);
}

@@ -792,21 +813,20 @@ }

if (path.indexOf(Utils.RESOURCE_PREFIX) === 0) {
return this.getDrawableFromResource(path); // number!
return this.getDrawableFromResource(path);
}
else {
drawable = this.getDrawableFromLocalFile(path);
return this.getDrawableFromLocalFile(path);
}
}
}
else {
drawable = new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), path.android);
else if (path instanceof ImageSource) {
return new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), path.android);
}
return drawable;
return null;
}
getDrawableFromLocalFile(localFilePath) {
const img = ImageSource.fromFileSync(localFilePath);
let drawable = null;
if (img) {
drawable = new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), img.android);
return new android.graphics.drawable.BitmapDrawable(Utils.android.getApplicationContext().getResources(), img.android);
}
return drawable;
return null;
}

@@ -817,26 +837,14 @@ getDrawableFromResource(resourceName) {

const identifier = resources.getIdentifier(resourceName.substring(Utils.RESOURCE_PREFIX.length), 'drawable', application.getPackageName());
// we return the identifier to allow Fresco to handle memory / caching
return identifier;
// return Utils.android.getApplicationContext().getDrawable(identifier);
}
startAnimating() {
if (this.nativeImageViewProtected) {
const controller = this.nativeImageViewProtected.getController();
if (controller) {
const animatable = controller.getAnimatable();
if (animatable) {
animatable.start();
}
}
const drawable = this.nativeViewProtected.getDrawable();
if (drawable && drawable instanceof android.graphics.drawable.Animatable) {
drawable.start();
}
}
stopAnimating() {
if (this.nativeImageViewProtected) {
const controller = this.nativeImageViewProtected.getController();
if (controller) {
const animatable = controller.getAnimatable();
if (animatable) {
animatable.stop();
}
}
const drawable = this.nativeViewProtected.getDrawable();
if (drawable && drawable instanceof android.graphics.drawable.Animatable) {
drawable.stop();
}

@@ -873,15 +881,15 @@ }

__decorate([
needUpdateHierarchy(true)
needRequestImage
], Img.prototype, _k, null);
__decorate([
needUpdateHierarchy
needRequestImage
], Img.prototype, _l, null);
__decorate([
needUpdateHierarchy
needRequestImage
], Img.prototype, _m, null);
__decorate([
needUpdateHierarchy
needRequestImage
], Img.prototype, _o, null);
__decorate([
needUpdateHierarchy
needRequestImage
], Img.prototype, _p, null);

@@ -897,107 +905,2 @@ __decorate([

], Img.prototype, _s, null);
__decorate([
needRequestImage
], Img.prototype, _t, null);
__decorate([
needRequestImage
], Img.prototype, _u, null);
__decorate([
needRequestImage
], Img.prototype, _v, null);
class GenericDraweeHierarchyBuilder {
constructor() {
const res = Utils.android.getApplicationContext().getResources();
this.nativeBuilder = new com.facebook.drawee.generic.GenericDraweeHierarchyBuilder(res);
}
setPlaceholderImage(drawable, scaleType) {
if (!this.nativeBuilder) {
return this;
}
if (scaleType) {
this.nativeBuilder.setPlaceholderImage(drawable, getScaleType(scaleType));
}
else {
this.nativeBuilder.setPlaceholderImage(drawable);
}
return this;
}
setActualImageColorFilter(filter) {
if (!this.nativeBuilder) {
return this;
}
this.nativeBuilder.setActualImageColorFilter(filter);
return this;
}
setFailureImage(drawable, scaleType) {
if (!this.nativeBuilder) {
return null;
}
if (scaleType) {
this.nativeBuilder.setFailureImage(drawable, getScaleType(scaleType));
}
else {
this.nativeBuilder.setFailureImage(drawable);
}
return this;
}
setActualImageScaleType(scaleType, imageRotation = 0) {
if (!this.nativeBuilder) {
return this;
}
const nativeScaleType = getScaleType(scaleType);
if (imageRotation !== 0 && nativeScaleType['setImageRotation']) {
nativeScaleType['setImageRotation'](imageRotation);
}
this.nativeBuilder.setActualImageScaleType(nativeScaleType);
return this;
}
build() {
if (!this.nativeBuilder) {
return null;
}
return this.nativeBuilder.build();
}
setFadeDuration(duration) {
if (!this.nativeBuilder) {
return null;
}
this.nativeBuilder.setFadeDuration(duration);
return this;
}
setBackground(drawable) {
if (!this.nativeBuilder) {
return this;
}
this.nativeBuilder.setBackground(drawable);
return this;
}
setProgressBarImage(color, stretch) {
if (!this.nativeBuilder) {
return null;
}
const drawable = new com.facebook.drawee.drawable.ProgressBarDrawable();
if (color) {
drawable.setColor(android.graphics.Color.parseColor(color));
}
this.nativeBuilder.setProgressBarImage(drawable, getScaleType(stretch));
return this;
}
setRoundingParamsAsCircle() {
if (!this.nativeBuilder) {
return this;
}
const params = com.facebook.drawee.generic.RoundingParams.asCircle();
this.nativeBuilder.setRoundingParams(params);
return this;
}
setCornersRadii(topLeft, topRight, bottomRight, bottomLeft) {
if (!this.nativeBuilder) {
return this;
}
const params = new com.facebook.drawee.generic.RoundingParams();
params.setCornersRadii(topLeft, topRight, bottomRight, bottomLeft);
this.nativeBuilder.setRoundingParams(params);
return this;
}
}
function getScaleType(scaleType) {

@@ -1007,34 +910,26 @@ if (isString(scaleType)) {

case ScaleType.Center:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeCenter();
return android.widget.ImageView.ScaleType.CENTER;
case ScaleType.AspectFill:
case ScaleType.CenterCrop:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeCenterCrop();
return android.widget.ImageView.ScaleType.CENTER_CROP;
case ScaleType.CenterInside:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeCenterInside();
return android.widget.ImageView.ScaleType.CENTER_INSIDE;
case ScaleType.FitCenter:
case ScaleType.AspectFit:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeFitCenter();
return android.widget.ImageView.ScaleType.FIT_CENTER;
case ScaleType.FitEnd:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeFitEnd();
return android.widget.ImageView.ScaleType.FIT_END;
case ScaleType.FitStart:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeFitStart();
return android.widget.ImageView.ScaleType.FIT_START;
case ScaleType.Fill:
case ScaleType.FitXY:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeFitXY();
return android.widget.ImageView.ScaleType.FIT_XY;
case ScaleType.FocusCrop:
//@ts-ignore
return new com.nativescript.image.ScalingUtils.ScaleTypeFocusCrop();
return android.widget.ImageView.ScaleType.CENTER_CROP;
default:
break;
return android.widget.ImageView.ScaleType.FIT_CENTER;
}
}
return null;
return android.widget.ImageView.ScaleType.FIT_CENTER;
}
//# sourceMappingURL=index.android.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../src/image/index.android.ts"],"names":[],"mappings":";AAAA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAqB,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,0BAA0B,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC3J,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAChE,OAAO,EAEH,IAAI,EACJ,SAAS,EACT,SAAS,EACT,SAAS,EAIT,SAAS,EAET,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EA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AC;YAC1D;gBACI,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC;QAC7D,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC;AACzD,CAAC"}
import { ImageAsset, ImageSource, View } from '@nativescript/core';
export * from './index-common.ts';
/**

@@ -7,3 +9,3 @@ * When called, initializes the android Image library. Calling this method is required.

*/
declare function initialize(config?: ImagePipelineConfigSetting): void;
export function initialize(config?: ImagePipelineConfigSetting): void;

@@ -14,3 +16,3 @@ /**

*/
declare function shutDown(): void;
export function shutDown(): void;

@@ -21,3 +23,3 @@ /**

*/
declare function getImagePipeline(): ImagePipeline;
export function getImagePipeline(): ImagePipeline;

@@ -126,12 +128,2 @@ /**

/**
* Boolean value used for showing or hiding the progress bar.
*/
showProgressBar: boolean;
/**
* String value used for setting the color of the progress bar. Can be set to hex values ("#FF0000"") and predefined colors ("green").
*/
progressBarColor: Color | string;
/**
* Boolean value used for determining if the image should be rounded as a circle.

@@ -267,69 +259,2 @@ */

/**
* Instances of this class are provided to the handlers of the {@link release} and {@link submit}.
*/
export class EventData {
/**
* Returns the name of the event that has been fired.
*/
eventName: string;
/**
* The object that fires the event.
*/
object: any;
}
/**
* Instances of this class are provided to the handlers of the {@link finalImageSet}.
*/
export class FinalEventData {
/**
* Returns the name of the event that has been fired.
*/
eventName: string;
/**
* The object that fires the event.
*/
object: any;
/**
* Contains information about an image.
*/
imageInfo: ImageInfo;
android?: AnimatedImage;
ios?: any; // UIImage
}
/**
* Instances of this class are provided to the handlers of the {@link intermediateImageSet}.
*/
export class IntermediateEventData {
/**
* Returns the name of the event that has been fired.
*/
eventName: string;
/**
* The object that fires the event.
*/
object: any;
/**
* Contains information about an image.
*/
imageInfo: ImageInfo;
}
/**
* Instances of this class are provided to the handlers of the {@link failure} and {@link intermediateImageFailed}.
*/
export class FailureEventData extends EventData {
/**
* An object containing information about the status of the event.
*/
error: Error;
}
/**
* Interface of the common abstraction behind a platform specific animated image object.

@@ -377,3 +302,3 @@ */

*/
isInDiskCache(uri: string): boolean;
isInDiskCache(uri: string): Promise<boolean>;

@@ -383,3 +308,3 @@ /**

*/
evictFromMemoryCache(uri: string): void;
evictFromMemoryCache(uri: string): Promise<boolean>;

@@ -389,3 +314,3 @@ /**

*/
async evictFromDiskCache(uri: string): void;
async evictFromDiskCache(uri: string): Promise<boolean>;

@@ -395,3 +320,3 @@ /**

*/
async evictFromCache(uri: string): void;
async evictFromCache(uri: string): Promise<boolean>;

@@ -401,3 +326,3 @@ /**

*/
clearCaches(): void;
clearCaches(): Promise<void>;

@@ -407,3 +332,3 @@ /**

*/
clearMemoryCaches(): void;
clearMemoryCaches(): Promise<void>;

@@ -413,3 +338,3 @@ /**

*/
clearDiskCaches(): void;
clearDiskCaches(): Promise<void>;

@@ -467,8 +392,8 @@ /**

* Advanced Configurations used for initializing Image
* For more details, see http://frescolib.org/docs/configure-image-pipeline.html
*/
export interface ImagePipelineConfigSetting {
isDownsampleEnabled?: boolean;
leakTracker?: any; // Android only
useOkhttp?: boolean; // Android only
// android only, disk cache key store persists to use evictFromDiskCache between app launches
usePersistentCacheKeyStore?: boolean;
// android signature key for cache. You can bump/change (v1, v2,...) to invalidate all cache
globalSignatureKey?: string;
}

@@ -479,2 +404,2 @@ export const ImageViewTraceCategory;

declare function registerPluginGetContextFromOptions(callback: GetContextFromOptionsCallback); // iOS only for plugins
export function registerPluginGetContextFromOptions(callback: GetContextFromOptionsCallback); // iOS only for plugins
export * from './index-common';
import { EventData, ImageBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting, SrcType, Stretch, failureImageUriProperty, headersProperty, imageRotationProperty, placeholderImageUriProperty, progressBarColorProperty, showProgressBarProperty, srcProperty, stretchProperty } from './index-common';
import { GetContextFromOptionsCallback } from '@nativescript-community/ui-image';
import { ImageBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting, SrcType, Stretch, failureImageUriProperty, headersProperty, imageRotationProperty, placeholderImageUriProperty, srcProperty, stretchProperty } from './index-common';
import { GetContextFromOptionsCallback } from '.';
export declare class ImageInfo implements ImageInfoBase {

@@ -11,6 +11,2 @@ private width;

}
export interface FinalEventData extends EventData {
imageInfo: ImageInfo;
ios: UIImage;
}
export declare function initialize(config?: ImagePipelineConfigSetting): void;

@@ -37,3 +33,3 @@ export declare function shutDown(): void;

}
export declare const needRequestImage: (target: any, propertyKey: string | Symbol, descriptor: PropertyDescriptor) => void;
export declare const needRequestImage: (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
export declare function getImagePipeline(): ImagePipeline;

@@ -44,4 +40,2 @@ export declare class Img extends ImageBase {

[placeholderImageUriProperty.setNative]: () => void;
[showProgressBarProperty.setNative]: (value: any) => void;
[progressBarColorProperty.setNative]: (value: any) => void;
[headersProperty.setNative]: (value: any) => void;

@@ -52,4 +46,5 @@ [failureImageUriProperty.setNative]: () => void;

nativeImageViewProtected: SDAnimatedImageView | UIImageView;
isLoading: boolean;
mCacheKey: string;
private _isRemote;
private _notifiedLoadSourceNetworkStart;
contextOptions: any;

@@ -56,0 +51,0 @@ get cacheKey(): string;

@@ -1,2 +0,2 @@

var _a, _b, _c, _d, _e;
var _a, _b, _c, _d;
export * from './index-common';

@@ -7,3 +7,3 @@ import { ApplicationSettings, ImageAsset, ImageSource, Screen, Trace, Utils, knownFolders, path } from '@nativescript/core';

import { isString } from '@nativescript/core/utils/types';
import { CLog, CLogTypes, ImageBase, ScaleType, failureImageUriProperty, headersProperty, imageRotationProperty, placeholderImageUriProperty, progressBarColorProperty, showProgressBarProperty, srcProperty, stretchProperty, wrapNativeException } from './index-common';
import { CLog, CLogTypes, ImageBase, ScaleType, failureImageUriProperty, headersProperty, imageRotationProperty, placeholderImageUriProperty, srcProperty, stretchProperty, wrapNativeException } from './index-common';
export class ImageInfo {

@@ -245,7 +245,8 @@ constructor(width, height) {

super(...arguments);
this.isLoading = false;
// network detection + notification guard
this._isRemote = false;
this._notifiedLoadSourceNetworkStart = false;
this.contextOptions = null;
this.mImageSourceAffectsLayout = true;
this.handleImageLoaded = (image, error, cacheType) => {
this.isLoading = false;
if (!this.nativeViewProtected) {

@@ -261,2 +262,13 @@ return;

}
let sourceStr = 'none';
if (typeof cacheType === 'number') {
if (cacheType === 2 /* SDImageCacheType.Memory */)
sourceStr = 'memory';
else if (cacheType === 1 /* SDImageCacheType.Disk */)
sourceStr = 'disk';
else if (cacheType === 0 /* SDImageCacheType.None */)
sourceStr = 'network';
else
sourceStr = 'unknown';
}
if (error) {

@@ -276,9 +288,41 @@ this.notify({

imageInfo: new ImageInfo(image.size.width, image.size.height),
ios: image
ios: image,
source: sourceStr
});
}
// Notify where the image came from (memory/disk/network) in a loadSource event.
// For cached (memory/disk) images, emit loadSource now (we already emit a "network start" in onLoadProgress for remote)
if (cacheType !== 0 /* SDImageCacheType.None */ && this.hasListeners(ImageBase.loadSourceEvent)) {
this.notify({
eventName: ImageBase.loadSourceEvent,
source: sourceStr
});
}
this.handleImageProgress(1);
};
this.onLoadProgress = (currentSize, totalSize) => {
this.handleImageProgress(totalSize > 0 ? currentSize / totalSize : -1, totalSize);
const fraction = totalSize > 0 ? currentSize / totalSize : -1;
this.handleImageProgress(fraction, totalSize);
Utils.executeOnMainThread(() => {
const eventName = ImageBase.progressEvent;
if (this.hasListeners(eventName)) {
// Notify progress event
this.notify({
eventName,
progress: fraction,
current: currentSize,
total: totalSize
});
}
// If this is a network load, notify loadSource event once at the first progress call
if (this._isRemote && !this._notifiedLoadSourceNetworkStart) {
this._notifiedLoadSourceNetworkStart = true;
if (this.hasListeners(ImageBase.loadSourceEvent)) {
this.notify({
eventName: ImageBase.loadSourceEvent,
source: 'network'
});
}
}
});
};

@@ -377,24 +421,16 @@ }

if (animated && this.fadeDuration) {
// switch (this.transition) {
// case 'fade':
this.nativeImageViewProtected.alpha = 0.0;
this.nativeImageViewProtected.image = nativeImage;
UIView.animateWithDurationAnimations(this.fadeDuration / 1000, () => {
this.nativeImageViewProtected.alpha = this.opacity;
});
// break;
// case 'curlUp':
// UIView.transitionWithViewDurationOptionsAnimationsCompletion(
// this.nativeImageViewProtected,
// 0.3,
// UIViewAnimationOptions.TransitionCrossDissolve,
// () => {
// this._setNativeImage(image);
// },
// null
// );
// break;
// default:
// this._setNativeImage(image);
// }
// Crossfade from the currently visible content (placeholder/previous image) to the new image.
try {
UIView.transitionWithViewDurationOptionsAnimationsCompletion(this.nativeImageViewProtected, this.fadeDuration / 1000, 5242880 /* UIViewAnimationOptions.TransitionCrossDissolve */, () => {
this.nativeImageViewProtected.image = nativeImage;
}, null);
}
catch (ex) {
// Fall back to an alpha fade if transition isn't available for some reason.
this.nativeImageViewProtected.alpha = 0.0;
this.nativeImageViewProtected.image = nativeImage;
UIView.animateWithDurationAnimations(this.fadeDuration / 1000, () => {
this.nativeImageViewProtected.alpha = this.opacity;
});
}
}

@@ -404,2 +440,4 @@ else {

}
// Ensure final alpha is set to the view's current opacity.
this.nativeImageViewProtected.alpha = this.opacity;
if (this.mImageSourceAffectsLayout) {

@@ -471,3 +509,7 @@ // this.mImageSourceAffectsLayout = false;

const uri = getUri(src);
this.isLoading = true;
// detect whether this uri is a remote HTTP/HTTPS resource
const scheme = uri && uri.scheme ? (uri.scheme + '').toLowerCase() : null;
this._isRemote = scheme === 'http' || scheme === 'https';
// reset network-start notification guard for this new request
this._notifiedLoadSourceNetworkStart = false;
let options = 2048 /* SDWebImageOptions.ScaleDownLargeImages */ | 1024 /* SDWebImageOptions.AvoidAutoSetImage */;

@@ -518,17 +560,2 @@ if (this.placeholderImageUri) {

}
if (this.showProgressBar) {
try {
if (this.progressBarColor) {
const indicator = new SDWebImageActivityIndicator();
indicator.indicatorView.color = this.progressBarColor.ios;
this.nativeImageViewProtected.sd_imageIndicator = indicator;
}
else {
this.nativeImageViewProtected.sd_imageIndicator = SDWebImageActivityIndicator.grayIndicator;
}
}
catch (ex) {
console.error(ex);
}
}
this.nativeImageViewProtected.sd_setImageWithURLPlaceholderImageOptionsContextProgressCompleted(uri, this.placeholderImage, options, context, this.onLoadProgress, this.handleImageLoaded);

@@ -551,9 +578,3 @@ }

[_c = placeholderImageUriProperty.setNative]() { }
[_d = showProgressBarProperty.setNative](value) {
this.showProgressBar = value;
}
[progressBarColorProperty.setNative](value) {
this.progressBarColor = value;
}
[_e = headersProperty.setNative](value) { }
[_d = headersProperty.setNative](value) { }
[failureImageUriProperty.setNative]() {

@@ -600,5 +621,2 @@ // this.updateHierarchy();

], Img.prototype, _d, null);
__decorate([
needRequestImage
], Img.prototype, _e, null);
//# sourceMappingURL=index.ios.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../src/image/index.ios.ts"],"names":[],"mappings":";AAAA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAS,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACnI,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EACH,IAAI,EACJ,SAAS,EAET,SAAS,EAGT,SAAS,EAGT,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,EACX,eAAe,EACf,mBAAmB,EACtB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,OAAO,SAAS;IAClB,YACY,KAAa,EACb,MAAc;QADd,UAAK,GAAL,KAAK,CAAQ;QACb,WAAM,GAAN,MAAM,CAAQ;IACvB,CAAC;IAEJ,SAAS;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,C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uBAAuB;IACvB,2BAA2B;IAC3B,iFAAiF;IACjF,qBAAqB;IACrB,0BAA0B;IAC1B,gFAAgF;IAChF,qBAAqB;IACrB,yBAAyB;IACzB,+EAA+E;IAC/E,qBAAqB;IACrB,QAAQ;IACR,IAAI;IAEJ,cAAc;QACV,IAAI,CAAC,wBAAwB,CAAC,cAAc,EAAE,CAAC;IACnD,CAAC;IACD,aAAa;QACT,IAAI,CAAC,wBAAwB,CAAC,aAAa,EAAE,CAAC;IAClD,CAAC;CACJ;AA5CG;IADC,gBAAgB;2BAGhB;AAED;IADC,gBAAgB;2BAGhB;AAGD;IADC,gBAAgB;2BAC2B;AAG5C;IADC,gBAAgB;2BACoB"}
{
"name": "@nativescript-community/ui-image",
"version": "4.6.6",
"description": "Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.",
"version": "5.0.0",
"description": "Advanced and efficient image display plugin which uses Glide (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.",
"main": "./index",

@@ -25,3 +25,3 @@ "sideEffects": false,

"JavaScript",
"Fresco",
"Glide",
"SDWebImage",

@@ -48,3 +48,3 @@ "cache",

"readmeFilename": "README.md",
"gitHead": "ee3df2725375f88f18762e5141ef097d9d8f6902"
"gitHead": "a4579e344c0bad4cc04c036fe16ce0c05ad4de96"
}
import groovy.json.JsonSlurper
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
def frescoVersion = project.hasProperty("frescoVersion") ? project.frescoVersion : "3.6.0"
def glideVersion = project.hasProperty("glideVersion") ? project.glideVersion : "5.0.5"
def glideCompilerVersion = project.hasProperty("glideCompilerVersion") ? project.glideCompilerVersion : "4.16.0"
def glideTransformationsVersion = project.hasProperty("glideTransformationsVersion") ? project.glideTransformationsVersion : "4.3.0"
def glideOkHttpVersion = project.hasProperty("glideOkHttpVersion") ? project.glideOkHttpVersion : "4.11.0"
implementation("com.facebook.fresco:fresco:$frescoVersion") {
exclude group: 'com.facebook.soloader', module: 'soloader'
exclude group: 'com.facebook.fresco', module: 'soloader'
}
implementation("com.facebook.fresco:imagepipeline-okhttp3:$frescoVersion") {
exclude group: 'com.facebook.soloader', module: 'soloader'
}
implementation("com.facebook.fresco:middleware:$frescoVersion")
implementation("com.facebook.fresco:nativeimagetranscoder:$frescoVersion")
implementation 'com.facebook.infer.annotation:infer-annotation:0.18.0'
// implementation ("com.facebook.fresco:animated-gif:$frescoVersion") {
// exclude group: 'com.facebook.soloader', module: 'soloader'
// }
def androidXAppCompatVersion = "${ns_default_androidx_appcompat_version}"
if (project.hasProperty("androidXAppCompat")) {
androidXAppCompatVersion = androidXAppCompat
outLogger.withStyle(Style.SuccessHeader).println "\t + using android X library androidx.appcompat:appcompat:$androidXAppCompatVersion"
}
implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
implementation "com.github.bumptech.glide:glide:$glideVersion"
annotationProcessor "com.github.bumptech.glide:compiler:$glideCompilerVersion"
implementation "jp.wasabeef:glide-transformations:$glideTransformationsVersion"
implementation "com.github.bumptech.glide:okhttp3-integration:$glideOkHttpVersion"
if (project.hasProperty("tempBuild")) {

@@ -23,0 +28,0 @@ // we need to copy the code in both places as N main gradle system does not support top level code

{
"uses": [
"com.facebook.drawee.drawable:ScalingUtils",
"com.facebook.drawee.drawable:ScalingUtils.ScaleType",
"com.facebook.drawee.generic:RoundingParams",
"com.facebook.drawee.drawable:ProgressBarDrawable",
"com.facebook.drawee.view:DraweeView",
"com.facebook.drawee.interfaces:DraweeHierarchy",
"com.facebook.drawee.interfaces:SettableDraweeHierarchy",
"com.facebook.drawee.interfaces:SimpleDraweeControllerBuilder",
"com.facebook.drawee.interfaces:DraweeController",
"com.facebook.drawee.generic:GenericDraweeHierarchyBuilder",
"com.facebook.drawee.generic:GenericDraweeHierarchy",
"com.facebook.imagepipeline.request:ImageRequestBuilder",
"com.facebook.imagepipeline.request:ImageRequest",
"com.facebook.imagepipeline.core:ImagePipelineConfig",
"com.facebook.imagepipeline.core:ImagePipelineConfig.Builder",
"com.facebook.imagepipeline.core:ImagePipeline",
"com.facebook.imagepipeline.common:RotationOptions",
"com.facebook.imagepipeline.common:ResizeOptions",
"com.facebook.drawee.backends.pipeline:Fresco",
"com.facebook.drawee.backends.pipeline:PipelineDraweeControllerBuilder",
"com.facebook.drawee.backends.pipeline:PipelineDraweeController",
"com.facebook.drawee.controller:AbstractDraweeControllerBuilder",
"com.facebook.drawee.controller:AbstractDraweeController",
"com.facebook.drawee.backends.pipeline.info:ImagePerfDataListener",
"com.facebook.drawee.backends.pipeline.info:ImagePerfData",
"com.facebook.drawee.controller:ControllerListener",
"com.nativescript.image:ScalingUtils*",
"com.nativescript.image:DraweeView",
"com.nativescript.image:OkHttpNetworkFetcher",
"com.nativescript.image:ScalingBlurPostprocessor",
"com.facebook.imagepipeline.producers:NetworkFetcher",
"com.facebook.imagepipeline.backends.okhttp3:OkHttpImagePipelineConfigFactory",
"okhttp3:OkHttpClient",
"android.graphics.drawable:Animatable",
"com.facebook.imagepipeline.image:ImageInfo",
"com.facebook.common.util:UriUtil",
"android.net:Uri",
"android.net:Uri.Builder"
"com.nativescript.image:SharedPrefCacheKeyStore",
"com.nativescript.image:CacheKeyStore",
"com.nativescript.image:EvictionManager",
"com.nativescript.image:EvictionManager.DiskPresenceCallback",
"com.nativescript.image:EvictionManager.EvictionCallback",
"com.nativescript.image:ImageProgressCallback",
"com.nativescript.image:ImageLoadSourceCallback",
"com.nativescript.image:CustomGlideUrl",
"com.nativescript.image:ConditionalCrossFadeFactory",
"com.nativescript.image:SaveKeysRequestListener",
"com.nativescript.image:CompositeRequestListener",
"com.nativescript.image:MatrixDrawableImageViewTarget",
"com.nativescript.image:MatrixImageView",
"com.bumptech.glide:Glide",
"com.bumptech.glide.signature:ObjectKey",
"com.bumptech.glide.request:RequestOptions",
"com.bumptech.glide.request:RequestBuilder",
"com.bumptech.glide.request:RequestListener",
"com.bumptech.glide.request.target:Target",
"com.bumptech.glide.request.target:ViewTarget",
"com.bumptech.glide:RequestManager",
"com.bumptech.glide.load:MultiTransformation",
"com.bumptech.glide.load:Transformation",
"com.bumptech.glide.load:DataSource",
"com.bumptech.glide.load:Key",
"com.bumptech.glide.load.resource.drawable:DrawableTransitionOptions",
"com.bumptech.glide.load.engine:DiskCacheStrategy",
"com.bumptech.glide.request.transition:Transition",
"com.bumptech.glide.request.transition:DrawableCrossFadeFactory",
"android.graphics.drawable:Drawable",
"android.graphics.drawable:BitmapDrawable",
"android.widget:ImageView:ScaleType",
"android.widget:ImageView",
"androidx.appcompat.widget:AppCompatImageView",
"android.graphics.PorterDuff:Mode",
"jp.wasabeef.glide.transformations:BlurTransformation",
"jp.wasabeef.glide.transformations:CropCircleTransformation",
"jp.wasabeef.glide.transformations:RoundedCornersTransformation",
"jp.wasabeef.glide.transformations:ColorFilterTransformation"
]
}

@@ -1,2 +0,2 @@

pod 'SDWebImage', '>= 5.18.5.0'
pod 'SDWebImage', '>= 5.21.3'
pod 'SDWebImagePhotosPlugin'

@@ -28,3 +28,3 @@ <!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->

<p align="center">
<b>Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.</b></br>
<b>Advanced and efficient image display plugin which uses Glide (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.</b></br>
<sub><sub>

@@ -88,3 +88,3 @@ </p>

//do this before creating any image view
imageModule.initialize({ isDownsampleEnabled: true });
imageModule.initialize();
```

@@ -428,3 +428,3 @@

- **decodeWidth** (downsampling) - make sure to enable downsample (**isDownsampleEnabled**) in the initialize function of the plugin otherwise this property is disregarded.
- **decodeWidth** (downsampling)

@@ -437,3 +437,3 @@ Number value used as the downsampled width of the imageModule drawable.

- **decodeHeight** (downsampling) - make sure to enable downsample (**isDownsampleEnabled**) in the initialize function of the plugin otherwise this property is disregarded.
- **decodeHeight** (downsampling)

@@ -462,18 +462,2 @@ Number value used as the downsampled width of the imageModule drawable.

- **showProgressBar**
Boolean value used for showing or hiding the progress bar.
```xml
<@nativescript-community/ui-image:Img showProgressBar="true"/>
```
- **progressBarColor**
String value used for setting the color of the progress bar. You can set it to hex values ("*#FF0000*") and/or predefined colors ("*green*").
```xml
<@nativescript-community/ui-image:Img progressBarColor="blue"/>
```
- **roundAsCircle**

@@ -480,0 +464,0 @@

/// <reference path="./typings/android.d.ts" />
/// <reference path="./typings/ios.d.ts" />
/// <reference path="./typings/objc!SDWebImagePhotosPlugin.d.ts" />
/// <reference path="../../node_modules/@nativescript/types-ios/lib/ios/objc-x86_64/objc!CoreImage.d.ts" />

@@ -1,27 +0,4 @@

/// <reference path="./fresco.d.ts" />
/// <reference path="./fresco-processors.d.ts" />
declare namespace com {
export namespace nativescript {
export namespace image {
class DraweeView extends facebook.drawee.view.SimpleDraweeView {
noRatioEnforce: boolean;
imageWidth: number;
imageHeight: number;
setUri(uri: globalAndroid.net.Uri, options: string, listener: facebook.drawee.controller.ControllerListener, requestListener: com.facebook.imagepipeline.listener.RequestListener);
}
class ScalingBlurPostprocessor extends facebook.imagepipeline.request.BasePostprocessor {
public constructor(iterations: number, blurRadius: number, scaleRatio: number);
}
class BaseDataSubscriberListener {
public constructor(implementation: { onNewResult(datasource: facebook.datasource.DataSource<any>); onFailure(datasource: facebook.datasource.DataSource<any>) });
public onNewResult(datasource: facebook.datasource.DataSource<any>);
public onFailure(datasource: facebook.datasource.DataSource<any>);
}
class BaseDataSubscriber extends facebook.datasource.BaseDataSubscriber<any> {
public constructor(listener: BaseDataSubscriberListener);
}
class OkHttpNetworkFetcher extends facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher {}
}
}
}
/// <reference path="./glide.android.d.ts" />
/// <reference path="./glide.okhttp.android.d.ts" />
/// <reference path="./glide.transform.android.d.ts" />
/// <reference path="./ui_image.android.d.ts" />
package com.nativescript.image;
import com.facebook.datasource.DataSource;
public class BaseDataSubscriber extends com.facebook.datasource.BaseDataSubscriber {
private BaseDataSubscriberListener listener;
public BaseDataSubscriber(BaseDataSubscriberListener listener) {
super();
this.listener = listener;
}
@Override
public void onNewResultImpl(DataSource dataSource) {
listener.onNewResult(dataSource);
}
@Override
public void onFailureImpl(DataSource dataSource) {
listener.onFailure(dataSource);
}
}
package com.nativescript.image;
import com.facebook.datasource.DataSource;
public interface BaseDataSubscriberListener {
public void onNewResult(DataSource dataSource);
public void onFailure(DataSource dataSource);
}
package com.nativescript.image;
import com.facebook.drawee.view.SimpleDraweeView;
import com.facebook.imagepipeline.request.ImageRequestBuilder;
import com.facebook.imagepipeline.request.ImageRequest;
import com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilder;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import android.graphics.Outline;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.view.View.MeasureSpec;
import android.view.View;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import android.util.AttributeSet;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.view.ViewOutlineProvider;
import org.nativescript.widgets.BorderDrawable;
import com.nativescript.image.ScalingUtils.AbstractScaleType;
import org.json.JSONArray;
import org.json.JSONObject;
import org.json.JSONException;
import java.util.Arrays;
public class DraweeView extends SimpleDraweeView {
public int imageWidth = 0;
public int imageHeight = 0;
public boolean isUsingOutlineProvider = false;
public boolean noRatioEnforce = false;
private static Paint clipPaint;
private boolean mLegacyVisibilityHandlingEnabled = false;
private static boolean sGlobalLegacyVisibilityHandlingEnabled = true;
public static void setGlobalLegacyVisibilityHandlingEnabled(
boolean legacyVisibilityHandlingEnabled) {
sGlobalLegacyVisibilityHandlingEnabled = legacyVisibilityHandlingEnabled;
}
public DraweeView(Context context, GenericDraweeHierarchy hierarchy) {
super(context);
}
public DraweeView(Context context) {
super(context);
// In Android N and above, visibility handling for Drawables has been changed, which breaks
// activity transitions with DraweeViews.
mLegacyVisibilityHandlingEnabled = sGlobalLegacyVisibilityHandlingEnabled && context.getApplicationInfo().targetSdkVersion >= 24; //Build.VERSION_CODES.N
}
public DraweeView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public DraweeView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
maybeOverrideVisibilityHandling();
onAttach();
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
maybeOverrideVisibilityHandling();
onDetach();
}
@Override
public void onStartTemporaryDetach() {
super.onStartTemporaryDetach();
maybeOverrideVisibilityHandling();
onDetach();
}
@Override
public void onFinishTemporaryDetach() {
super.onFinishTemporaryDetach();
maybeOverrideVisibilityHandling();
onAttach();
}
@Override
protected void onVisibilityChanged(
View changedView,
int visibility) {
super.onVisibilityChanged(changedView, visibility);
maybeOverrideVisibilityHandling();
}
@Override
public void onVisibilityAggregated (boolean isVisible) {
super.onVisibilityAggregated(isVisible);
maybeOverrideVisibilityHandling();
}
private void maybeOverrideVisibilityHandling() {
if (mLegacyVisibilityHandlingEnabled) {
Drawable drawable = getDrawable();
if (drawable != null) {
drawable.setVisible(getVisibility() == VISIBLE, false);
}
}
}
public void setLegacyVisibilityHandlingEnabled(boolean legacyVisibilityHandlingEnabled) {
mLegacyVisibilityHandlingEnabled = legacyVisibilityHandlingEnabled;
}
public void updateOutlineProvider() {
Drawable drawable = getBackground();
if (android.os.Build.VERSION.SDK_INT >= 21) {
// we try to support N setting outline provider now
if (!isUsingOutlineProvider && getOutlineProvider() != null) {
// already handled somewhere else
return;
}
if (drawable instanceof BorderDrawable && (android.os.Build.VERSION.SDK_INT >= 33 || ((BorderDrawable)drawable).hasUniformBorderRadius())) {
setOutlineProvider(new ViewOutlineProvider() {
@Override
public void getOutline(View view, Outline outline) {
Drawable drawable = getBackground();
if (drawable instanceof BorderDrawable) {
BorderDrawable borderDrawable = (BorderDrawable) drawable;
// that if test is only needed until N BorderDrawable is updated to do it
if (borderDrawable.hasUniformBorderRadius()) {
// outlineRect.set(borderDrawable.getBounds());
outline.setRoundRect(borderDrawable.getBounds(), borderDrawable.getBorderBottomLeftRadius());
} else {
drawable.getOutline(outline);
}
} else {
outline.setRect(100, 100, view.getWidth() - 200, view.getHeight() - 200);
}
}
});
setClipToOutline(true);
isUsingOutlineProvider = true;
// } else if (android.os.Build.VERSION.SDK_INT >= 21) {
// isUsingOutlineProvider = false;
// setOutlineProvider(null);
// setClipToOutline(false);
}
}
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int widthMode = MeasureSpec.getMode(widthMeasureSpec);
int width = MeasureSpec.getSize(widthMeasureSpec);
int heightMode = MeasureSpec.getMode(heightMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
boolean finiteWidth = widthMode == android.view.View.MeasureSpec.EXACTLY;
boolean finiteHeight = heightMode == android.view.View.MeasureSpec.EXACTLY;
float aspectRatio = this.getAspectRatio();
if (aspectRatio > 0 && !this.noRatioEnforce) {
Object scaleType = getHierarchy().getActualImageScaleType();
if (scaleType instanceof AbstractScaleType) {
final float rotation = ((AbstractScaleType)scaleType).getImageRotation();
if (Math.abs(rotation) % 180 != 0) {
aspectRatio = 1.0f / aspectRatio;
}
}
if (imageWidth != 0 && imageHeight != 0) {
if (!finiteWidth && finiteHeight) {
widthMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec((int) (height * aspectRatio),
android.view.View.MeasureSpec.EXACTLY);
} else if (!finiteHeight && finiteWidth) {
heightMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec((int) (width / aspectRatio),
android.view.View.MeasureSpec.EXACTLY);
} else if (!finiteWidth && !finiteHeight ) {
float viewRatio = width / (float)height;
if (viewRatio < aspectRatio) {
widthMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec((int) width, android.view.View.MeasureSpec.EXACTLY);
heightMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec((int) (width / aspectRatio), android.view.View.MeasureSpec.EXACTLY);
} else {
widthMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec((int) (height * aspectRatio), android.view.View.MeasureSpec.EXACTLY);
heightMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec((int) height, android.view.View.MeasureSpec.EXACTLY);
}
}
}
} else {
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
Path innerBorderPath;
Path innerBorderTempPath;
private Path generateInnerBorderPath(BorderDrawable borderDrawable) {
float borderTopLeftRadius = borderDrawable.getBorderTopLeftRadius();
float borderTopRightRadius = borderDrawable.getBorderTopRightRadius();
float borderBottomRightRadius = borderDrawable.getBorderBottomRightRadius();
float borderBottomLeftRadius = borderDrawable.getBorderBottomLeftRadius();
float borderLeftWidth = borderDrawable.getBorderLeftWidth();
float borderBottomWidth = borderDrawable.getBorderBottomWidth();
float borderTopWidth = borderDrawable.getBorderTopWidth();
float borderRightWidth = borderDrawable.getBorderRightWidth();
if (innerBorderPath == null) {
innerBorderPath = new Path();
} else {
innerBorderPath.reset();
}
if (innerBorderTempPath == null) {
innerBorderTempPath = new Path();
} else {
innerBorderTempPath.reset();
}
Rect bounds = borderDrawable.getBounds();
float width = (float) borderDrawable.getBounds().width();
float height = (float) borderDrawable.getBounds().height();
RectF borderInnerRect = new RectF(borderLeftWidth, borderTopWidth, width - borderRightWidth,
height - borderBottomWidth);
float[] borderInnerRadii = { Math.max(0, borderTopLeftRadius - borderLeftWidth),
Math.max(0, borderTopLeftRadius - borderTopWidth), Math.max(0, borderTopRightRadius - borderRightWidth),
Math.max(0, borderTopRightRadius - borderTopWidth),
Math.max(0, borderBottomRightRadius - borderRightWidth),
Math.max(0, borderBottomRightRadius - borderBottomWidth),
Math.max(0, borderBottomLeftRadius - borderLeftWidth),
Math.max(0, borderBottomLeftRadius - borderBottomWidth) };
innerBorderTempPath.addRoundRect(borderInnerRect, borderInnerRadii, Path.Direction.CW);
innerBorderPath.addRect(new RectF(bounds), Path.Direction.CW);
innerBorderPath.op(innerBorderTempPath, Path.Op.DIFFERENCE);
return innerBorderPath;
}
@Override
protected void onDraw(Canvas canvas) {
Drawable drawable = getBackground();
if (!isUsingOutlineProvider && drawable instanceof BorderDrawable) {
BorderDrawable borderDrawable = (BorderDrawable) drawable;
Path clipPath = generateInnerBorderPath(borderDrawable);
if (clipPath != null) {
if (DraweeView.clipPaint == null) {
DraweeView.clipPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
DraweeView.clipPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
}
int saveCount;
int width = getWidth();
int height = getHeight();
if (android.os.Build.VERSION.SDK_INT >= 21) {
saveCount = canvas.saveLayer(new android.graphics.RectF(0.0f, 0.0f, width, height), null);
} else {
saveCount = canvas.saveLayer(0.0f, 0.0f, width, height, null, Canvas.ALL_SAVE_FLAG);
}
super.onDraw(canvas);
canvas.drawPath(clipPath, DraweeView.clipPaint);
canvas.restoreToCount(saveCount);
return;
}
}
super.onDraw(canvas);
}
public void setUri(android.net.Uri uri, String jsonOptions, com.facebook.drawee.controller.ControllerListener listener, com.facebook.imagepipeline.listener.RequestListener requestListener) {
ImageRequestBuilder requestBuilder = ImageRequestBuilder.newBuilderWithSource(uri).setRotationOptions( com.facebook.imagepipeline.common.RotationOptions.autoRotate());
if (requestListener != null) {
requestBuilder.setRequestListener(requestListener);
}
JSONObject object = null;
JSONObject headers = null;
if (jsonOptions.length() > 2) {
try {
object = new JSONObject(jsonOptions);
} catch (Exception e) {
e.printStackTrace();
}
}
if (object != null) {
if (object.optBoolean("progressiveRenderingEnabled")) {
requestBuilder = requestBuilder.setProgressiveRenderingEnabled(true);
}
if (object.optBoolean("localThumbnailPreviewsEnabled")) {
requestBuilder = requestBuilder.setLocalThumbnailPreviewsEnabled(true);
}
int decodeWidth = object.optInt("decodeWidth");
int decodeHeight = object.optInt("decodeHeight");
if (decodeWidth > 0 || decodeHeight > 0) {
requestBuilder = requestBuilder.setResizeOptions(new com.facebook.imagepipeline.common.ResizeOptions(decodeWidth > 0 ? decodeWidth : decodeHeight, decodeHeight > 0 ? decodeHeight : decodeWidth));
}
int blurRadius = object.optInt("blurRadius", 0);
if (blurRadius > 0) {
int blurDownSampling = object.optInt("blurDownSampling", 1);
requestBuilder = requestBuilder.setPostprocessor(new com.nativescript.image.ScalingBlurPostprocessor(2, blurRadius, blurDownSampling));
}
headers = object.optJSONObject("headers");
}
ImageRequest request = NetworkImageRequest.fromBuilderWithHeaders(requestBuilder, headers);
// if (object != null && object.optBoolean("async") == false) {
// DataSource<CloseableReference<CloseableImage>> dataSource =
// imagePipeline.fetchImageFromBitmapCache(imageRequest, uri.toString());
// try {
// CloseableReference<CloseableImage> result = DataSources.waitForFinalResult(dataSource);
// if (result != null) {
// // Do something with the image, but do not keep the reference to it!
// // The image may get recycled as soon as the reference gets closed below.
// // If you need to keep a reference to the image, read the following sections.
// }
// } finally {
// dataSource.close();
// }
// }
PipelineDraweeControllerBuilder builder = com.facebook.drawee.backends.pipeline.Fresco.newDraweeControllerBuilder();
builder.setImageRequest(request);
builder.setCallerContext(uri.toString());
builder.setControllerListener(listener);
builder.setOldController(getController());
// if (Trace.isEnabled()) {
// builder.setPerfDataListener(
// new com.facebook.drawee.backends.pipeline.info.ImagePerfDataListener({
// onImageLoadStatusUpdated(param0: com.facebook.drawee.backends.pipeline.info.ImagePerfData, param1: number) {
// CLog(CLogTypes.info, 'onImageLoadStatusUpdated', param0, param1);
// },
// onImageVisibilityUpdated(param0: com.facebook.drawee.backends.pipeline.info.ImagePerfData, param1: number) {
// CLog(CLogTypes.info, 'onImageVisibilityUpdated', param0, param1);
// }
// })
// );
// }
if (object != null) {
String lowerResSrc = object.optString("lowerResSrc");
if (lowerResSrc != null) {
builder.setLowResImageRequest(com.facebook.imagepipeline.request.ImageRequest.fromUri(android.net.Uri.parse(lowerResSrc)));
}
if (object.optBoolean("autoPlayAnimations")) {
builder.setAutoPlayAnimations(true);
}
if (object.optBoolean("tapToRetryEnabled")) {
builder.setTapToRetryEnabled(true);
}
}
setController(builder.build());
}
@Override
public void setBackground(Drawable background) {
super.setBackground(background);
updateOutlineProvider();
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
updateOutlineProvider();
}
}
package com.nativescript.image;
import com.facebook.imagepipeline.request.ImageRequest;
import com.facebook.imagepipeline.request.ImageRequestBuilder;
import org.json.JSONObject;
import org.json.JSONException;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
import android.util.Log;
/** Extended ImageRequest with request headers */
public class NetworkImageRequest extends ImageRequest {
/** Headers for the request */
private Map<String, String> mHeaders = null;
static Map<String, String> toMap(JSONObject object) throws JSONException {
Map<String, String> map = new HashMap<String, String>();
Iterator<String> keysItr = object.keys();
while(keysItr.hasNext()) {
String key = keysItr.next();
Object value = object.get(key);
if(value instanceof String) {
map.put(key, (String)value);
}
}
return map;
}
public static NetworkImageRequest fromBuilderWithHeaders(
ImageRequestBuilder builder, JSONObject headers) {
return new NetworkImageRequest(builder, headers);
}
protected NetworkImageRequest(ImageRequestBuilder builder, JSONObject headers) {
super(builder);
if (headers != null) {
try {
mHeaders = toMap(headers);
} catch (Exception e) {
e.printStackTrace();
}
}
}
public Map<String, String> getHeaders() {
return mHeaders;
}
}
package com.nativescript.image;
import android.net.Uri;
import android.os.SystemClock;
import android.util.Log;
import com.facebook.imagepipeline.producers.NetworkFetcher;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Executor;
import okhttp3.CacheControl;
import okhttp3.Headers;
import okhttp3.OkHttpClient;
import okhttp3.Request;
public class OkHttpNetworkFetcher extends com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher {
private static final String TAG = "OkHttpNetworkFetcher";
private final OkHttpClient mOkHttpClient;
private final Executor mCancellationExecutor;
/**
* @param okHttpClient client to use
*/
public OkHttpNetworkFetcher(OkHttpClient okHttpClient) {
super(okHttpClient);
mOkHttpClient = okHttpClient;
mCancellationExecutor = okHttpClient.dispatcher().executorService();
}
@Override
public void fetch(
final OkHttpNetworkFetcher.OkHttpNetworkFetchState fetchState,
final NetworkFetcher.Callback callback) {
fetchState.submitTime = SystemClock.elapsedRealtime();
final Uri uri = fetchState.getUri();
Map<String, String> requestHeaders = null;
if (fetchState.getContext().getImageRequest() instanceof NetworkImageRequest) {
NetworkImageRequest networkImageRequest =
(NetworkImageRequest) fetchState.getContext().getImageRequest();
requestHeaders = networkImageRequest.getHeaders();
}
if (requestHeaders == null) {
requestHeaders = Collections.emptyMap();
}
final Request request =
new Request.Builder()
.url(uri.toString())
.headers(Headers.of(requestHeaders))
.get()
.build();
fetchWithRequest(fetchState, callback, request);
}
}
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.nativescript.image;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import com.facebook.common.references.CloseableReference;
import com.facebook.imagepipeline.bitmaps.PlatformBitmapFactory;
import com.facebook.imagepipeline.nativecode.NativeBlurFilter;
import com.facebook.imagepipeline.request.BasePostprocessor;
/**
* Applies a blur filter using the {@link NativeBlurFilter#iterativeBoxBlur(Bitmap, int, int)} and
* down-scales the bitmap beforehand.
*/
public class ScalingBlurPostprocessor extends BasePostprocessor {
private final Paint mPaint = new Paint();
private final int mIterations;
private final int mBlurRadius;
/**
* A scale ration of 4 means that we reduce the total number of pixels to process by factor 16.
*/
private final int mScaleRatio;
public ScalingBlurPostprocessor(int iterations, int blurRadius, int scaleRatio) {
mIterations = iterations;
mBlurRadius = blurRadius;
mScaleRatio = scaleRatio;
}
@Override
public CloseableReference<Bitmap> process(
Bitmap sourceBitmap, PlatformBitmapFactory bitmapFactory) {
final CloseableReference<Bitmap> bitmapRef =
bitmapFactory.createBitmap(
sourceBitmap.getWidth() / mScaleRatio, sourceBitmap.getHeight() / mScaleRatio);
try {
final Bitmap destBitmap = bitmapRef.get();
final Canvas canvas = new Canvas(destBitmap);
canvas.drawBitmap(
sourceBitmap,
null,
new Rect(0, 0, destBitmap.getWidth(), destBitmap.getHeight()),
mPaint);
NativeBlurFilter.iterativeBoxBlur(
destBitmap, mIterations, Math.max(1, mBlurRadius / mScaleRatio));
return CloseableReference.cloneOrNull(bitmapRef);
} finally {
CloseableReference.closeSafely(bitmapRef);
}
}
}
package com.nativescript.image;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.Rect;
import android.util.Log;
/** Performs scale type calculations. */
public class ScalingUtils {
/**
* Options for scaling the child bounds to the parent bounds.
*
* <p>Similar to {@link android.widget.ImageView.ScaleType}, but ScaleType.MATRIX is not
* supported. To use matrix scaling, use a {@link MatrixDrawable}. An additional scale type
* (FOCUS_CROP) is provided.
*
* <p>
*/
public interface ScaleType {
/**
* Scales width and height independently, so that the child matches the parent exactly. This may
* change the aspect ratio of the child.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FIT_XY = ScaleTypeFitXY.INSTANCE;
/**
* Scales the child so that the child's width fits exactly. The height will be cropped if it
* exceeds parent's bounds. Aspect ratio is preserved. Child is centered within the parent's
* bounds.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FIT_X = ScaleTypeFitX.INSTANCE;
/**
* Scales the child so that the child's height fits exactly. The width will be cropped if it
* exceeds parent's bounds. Aspect ratio is preserved. Child is centered within the parent's
* bounds.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FIT_Y = ScaleTypeFitY.INSTANCE;
/**
* Scales the child so that it fits entirely inside the parent. At least one dimension (width or
* height) will fit exactly. Aspect ratio is preserved. Child is aligned to the top-left corner
* of the parent.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FIT_START = ScaleTypeFitStart.INSTANCE;
/**
* Scales the child so that it fits entirely inside the parent. At least one dimension (width or
* height) will fit exactly. Aspect ratio is preserved. Child is centered within the parent's
* bounds.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FIT_CENTER = ScaleTypeFitCenter.INSTANCE;
/**
* Scales the child so that it fits entirely inside the parent. At least one dimension (width or
* height) will fit exactly. Aspect ratio is preserved. Child is aligned to the bottom-right
* corner of the parent.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FIT_END = ScaleTypeFitEnd.INSTANCE;
/** Performs no scaling. Child is centered within parent's bounds. */
com.facebook.drawee.drawable.ScalingUtils.ScaleType CENTER = ScaleTypeCenter.INSTANCE;
/**
* Scales the child so that it fits entirely inside the parent. Unlike FIT_CENTER, if the child
* is smaller, no up-scaling will be performed. Aspect ratio is preserved. Child is centered
* within parent's bounds.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType CENTER_INSIDE = ScaleTypeCenterInside.INSTANCE;
/**
* Scales the child so that both dimensions will be greater than or equal to the corresponding
* dimension of the parent. At least one dimension (width or height) will fit exactly. Child is
* centered within parent's bounds.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType CENTER_CROP = ScaleTypeCenterCrop.INSTANCE;
/**
* Scales the child so that both dimensions will be greater than or equal to the corresponding
* dimension of the parent. At least one dimension (width or height) will fit exactly. The
* child's focus point will be centered within the parent's bounds as much as possible without
* leaving empty space. It is guaranteed that the focus point will be visible and centered as
* much as possible. If the focus point is set to (0.5f, 0.5f), result will be equivalent to
* CENTER_CROP.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FOCUS_CROP = ScaleTypeFocusCrop.INSTANCE;
/**
* Scales the child so that it fits entirely inside the parent. At least one dimension (width or
* height) will fit exactly. Aspect ratio is preserved. Child is aligned to the bottom-left
* corner of the parent.
*/
com.facebook.drawee.drawable.ScalingUtils.ScaleType FIT_BOTTOM_START = ScaleTypeFitBottomStart.INSTANCE;
/**
* Gets transformation matrix based on the scale type.
*
* @param outTransform out matrix to store result
* @param parentBounds parent bounds
* @param childWidth child width
* @param childHeight child height
* @param focusX focus point x coordinate, relative [0...1]
* @param focusY focus point y coordinate, relative [0...1]
* @return same reference to the out matrix for convenience
*/
Matrix getTransform(
Matrix outTransform,
Rect parentBounds,
int childWidth,
int childHeight,
float focusX,
float focusY);
}
/** A convenience base class that has some common logic. */
public abstract static class AbstractScaleType implements com.facebook.drawee.drawable.ScalingUtils.ScaleType, com.facebook.drawee.drawable.ScalingUtils.StatefulScaleType {
protected Matrix _imageMatrix = null;
protected float _imageRotation = 0;
public void setImageMatrix(Matrix matrix) {
_imageMatrix = matrix;
}
public float getImageRotation() {
return _imageRotation;
}
public void setImageRotation(float rotation) {
_imageRotation = rotation;
}
@Override
public Object getState() {
if (_imageMatrix != null) {
return _imageMatrix;
}
return _imageRotation;
}
@Override
public Matrix getTransform(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY) {
float sX = (float) parentRect.width() / (float) childWidth;
float sY = (float) parentRect.height() / (float) childHeight;
// add 360 to ensure we get positive value
float rotationDelta = (90 - ((_imageRotation + 360) % 180))/90.0f;
if (rotationDelta != 1) {
float destSX = (float) parentRect.width() / (float) childHeight;
float destSY = (float) parentRect.height() / (float) childWidth;
if (rotationDelta < 0) {
sX = destSX + rotationDelta * (destSX - sX);
sY = destSY + rotationDelta * (destSY - sY);
} else {
sX = sX + (1 - rotationDelta) * (destSX - sX);
sY = sY + (1 - rotationDelta) * (destSY - sY);
}
}
getTransformImpl(outTransform, parentRect, childWidth, childHeight, focusX, focusY, sX, sY, rotationDelta);
if (_imageMatrix != null) {
outTransform.preConcat(_imageMatrix);
} else if (_imageRotation != 0) {
outTransform.preRotate(_imageRotation, childWidth / 2.0f, childHeight / 2.0f);
}
return outTransform;
}
public abstract void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta);
}
public static class ScaleTypeFitXY extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFitXY();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float deltaX = ((rotationDelta != 1) ? (childWidth - childHeight) * scaleX/ 2.0f : 0.0f);
float deltaY = ((rotationDelta != 1) ? (childWidth - childHeight) * scaleY/ 2.0f : 0.0f);
float dx = parentRect.left - deltaX;
float dy = parentRect.top + deltaY;
outTransform.setScale(scaleX, scaleY);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "fit_xy";
}
}
public static class ScaleTypeFitStart extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFitStart();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale = Math.min(scaleX, scaleY);
float delta = ((rotationDelta != 1) ? (childWidth - childHeight) * scale/ 2.0f : 0.0f);
float dx = parentRect.left - delta;
float dy = parentRect.top + delta;
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "fit_start";
}
}
public static class ScaleTypeFitBottomStart extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFitBottomStart();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale = Math.min(scaleX, scaleY);
float dx = parentRect.left;
float dy = parentRect.top + (parentRect.height() - childHeight * scale);
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "fit_bottom_start";
}
}
public static class ScaleTypeFitCenter extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFitCenter();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale = Math.min(scaleX, scaleY);
float dx = parentRect.left + (parentRect.width() - childWidth * scale) * 0.5f;
float dy = parentRect.top + (parentRect.height() - childHeight * scale) * 0.5f;
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "fit_center";
}
}
public static class ScaleTypeFitEnd extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFitEnd();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale = Math.min(scaleX, scaleY);
float delta = ((rotationDelta != 1) ? (childWidth - childHeight) * scale/ 2.0f : 0.0f);
float dx = parentRect.left + (parentRect.width() - childWidth * scale) + delta;
float dy = parentRect.top + (parentRect.height() - childHeight * scale) - delta;
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "fit_end";
}
}
public static class ScaleTypeCenter extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeCenter();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float dx = parentRect.left + (parentRect.width() - childWidth) * 0.5f;
float dy = parentRect.top + (parentRect.height() - childHeight) * 0.5f;
outTransform.setTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "center";
}
}
public static class ScaleTypeCenterInside extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeCenterInside();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale = Math.min(Math.min(scaleX, scaleY), 1.0f);
float dx = parentRect.left + (parentRect.width() - childWidth * scale) * 0.5f;
float dy = parentRect.top + (parentRect.height() - childHeight * scale) * 0.5f;
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "center_inside";
}
}
public static class ScaleTypeCenterCrop extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeCenterCrop();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale, dx, dy;
if (scaleY > scaleX) {
scale = scaleY;
dx = parentRect.left + (parentRect.width() - childWidth * scale) * 0.5f;
dy = parentRect.top + (parentRect.height() - childHeight * scale) * 0.5f;
} else {
scale = scaleX;
dx = parentRect.left + (parentRect.width() - childWidth * scale) * 0.5f;
dy = parentRect.top + (parentRect.height() - childHeight * scale) * 0.5f;
}
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "center_crop";
}
}
public static class ScaleTypeFocusCrop extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFocusCrop();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale, dx, dy, delta;
if (scaleY > scaleX) {
scale = scaleY;
delta = ((rotationDelta != 1) ? (childWidth - childHeight) * scale/ 2.0f : 0.0f);
dx = parentRect.width() * 0.5f - childWidth * scale * focusX;
dx = parentRect.left + Math.max(Math.min(dx, 0), parentRect.width() - childWidth * scale);
dy = parentRect.height() * 0.5f - childHeight * scale * focusY;
dy = parentRect.top + Math.max(Math.min(dy, 0), parentRect.height() - childHeight * scale) - delta;
} else {
scale = scaleX;
delta = ((rotationDelta != 1) ? (childWidth - childHeight) * scale: 0.0f);
dx = parentRect.width() * 0.5f - childWidth * scale * focusX;
dx = parentRect.left + Math.max(Math.min(dx, 0), parentRect.width() - childWidth * scale) + Math.min(delta / 2.0f, 0.0f);
dy = parentRect.height() * 0.5f - childHeight * scale * focusY;
dy = parentRect.top + Math.max(Math.min(dy, 0), parentRect.height() - childHeight * scale);
}
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "focus_crop";
}
}
public static class ScaleTypeFitX extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFitX();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale, dx, dy;
scale = scaleX;
dx = parentRect.left;
dy = parentRect.top + (parentRect.height() - childHeight * scale) * 0.5f;
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "fit_x";
}
}
public static class ScaleTypeFitY extends AbstractScaleType {
public static final com.facebook.drawee.drawable.ScalingUtils.ScaleType INSTANCE = new ScaleTypeFitY();
@Override
public void getTransformImpl(
Matrix outTransform,
Rect parentRect,
int childWidth,
int childHeight,
float focusX,
float focusY,
float scaleX,
float scaleY,
float rotationDelta) {
float scale, dx, dy;
scale = scaleY;
dx = parentRect.left + (parentRect.width() - childWidth * scale) * 0.5f;
dy = parentRect.top;
outTransform.setScale(scale, scale);
outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));
}
@Override
public String toString() {
return "fit_y";
}
}
}
/* eslint-disable @typescript-eslint/adjacent-overload-signatures */
/* eslint-disable @typescript-eslint/unified-signatures */
declare namespace jp {
export namespace wasabeef {
export namespace fresco {
export namespace processors {
export class BlurPostprocessor {
public static class: java.lang.Class<BlurPostprocessor>;
public constructor(param0: globalAndroid.content.Context);
public getName(): string;
public constructor(param0: globalAndroid.content.Context, param1: number);
public getPostprocessorCacheKey(): com.facebook.cache.common.CacheKey;
public constructor(param0: globalAndroid.content.Context, param1: number, param2: number);
public process(param0: globalAndroid.graphics.Bitmap, param1: globalAndroid.graphics.Bitmap): void;
}
export class ColorFilterPostprocessor {
public static class: java.lang.Class<ColorFilterPostprocessor>;
public getName(): string;
public getPostprocessorCacheKey(): com.facebook.cache.common.CacheKey;
public process(param0: globalAndroid.graphics.Bitmap, param1: globalAndroid.graphics.Bitmap): void;
public constructor(param0: number);
}
export class CombinePostProcessors {
public static class: java.lang.Class<CombinePostProcessors>;
public process(param0: globalAndroid.graphics.Bitmap, param1: globalAndroid.graphics.Bitmap): void;
}
export namespace CombinePostProcessors {
export class Builder {
public static class: java.lang.Class<Builder>;
public build(): CombinePostProcessors;
public constructor();
public add(param0: com.facebook.imagepipeline.request.BasePostprocessor): Builder;
}
}
export class GrayscalePostprocessor {
public static class: java.lang.Class<GrayscalePostprocessor>;
public constructor();
public getName(): string;
public getPostprocessorCacheKey(): com.facebook.cache.common.CacheKey;
public process(param0: globalAndroid.graphics.Bitmap, param1: globalAndroid.graphics.Bitmap): void;
}
export class MaskPostprocessor {
public static class: java.lang.Class<MaskPostprocessor>;
public getName(): string;
public constructor(param0: globalAndroid.content.Context, param1: number);
public getPostprocessorCacheKey(): com.facebook.cache.common.CacheKey;
public process(param0: globalAndroid.graphics.Bitmap, param1: globalAndroid.graphics.Bitmap): void;
}
}
}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet