org.robolectric.annotation.Implementation.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(747)

本文整理了Java中org.robolectric.annotation.Implementation.<init>()方法的一些代码示例,展示了Implementation.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Implementation.<init>()方法的具体详情如下:
包路径:org.robolectric.annotation.Implementation
类名称:Implementation
方法名:<init>

Implementation.<init>介绍

暂无

代码示例

代码示例来源:origin: bumptech/glide

@Implementation
@Override
public void updateAppWidget(int[] appWidgetIds, RemoteViews views) {
 updatedWidgetIds = appWidgetIds;
 updatedRemoteViews = views;
}

代码示例来源:origin: bumptech/glide

@Implementation
 public static boolean isLoggable(String tag, int level) {
  return true;
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
 @Override
 public void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) {
  // Do nothing.
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
 @Override
 public void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) {
  // Do nothing.
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
@SuppressWarnings("WeakerAccess")
public boolean isAlive() {
 return isAlive;
}

代码示例来源:origin: bumptech/glide

@Implementation
 public LayoutParams getLayoutParams() {
  return layoutParams;
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
 public void updateAppWidget(ComponentName componentName, RemoteViews views) {
  updatedComponentName = componentName;
  updatedRemoteViews = views;
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
public SizedShadowView setLayoutParams(LayoutParams layoutParams) {
 this.layoutParams = layoutParams;
 return this;
}

代码示例来源:origin: bumptech/glide

@Implementation
@Override
public void requestLayout() {
 isLayoutRequested = true;
}

代码示例来源:origin: bumptech/glide

@SuppressWarnings("unused")
 @Implementation
 public static long elapsedRealtime() {
  // The default is to return something using the main looper, which doesn't exist on
  // Volley's threads.
  return System.currentTimeMillis();
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
 public AssetFileDescriptor openAssetFileDescriptor(Uri uri, String mode) {
  return fileDescriptorMap.get(uri);
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
@Override
public void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) {
 drawnBitmaps.add(bitmap);
}

代码示例来源:origin: bumptech/glide

@Implementation
public InputStream openInputStream(Uri uri) {
 if (!URI_TO_INPUT_STREAMS.containsKey(uri)) {
  throw new IllegalArgumentException(
    "You must first register an InputStream for uri: " + uri);
 }
 return URI_TO_INPUT_STREAMS.get(uri);
}

代码示例来源:origin: bumptech/glide

@SuppressWarnings("unused")
@Implementation
public void removeOnPreDrawListener(OnPreDrawListener listener) {
 checkIsAlive();
 preDrawListeners.remove(listener);
}

代码示例来源:origin: bumptech/glide

@Implementation
 @Override
 public NetworkInfo getActiveNetworkInfo() {
  if (!isNetworkPermissionGranted) {
   throw new SecurityException();
  }
  return super.getActiveNetworkInfo();
 }
}

代码示例来源:origin: bumptech/glide

@SuppressWarnings("unused")
@Implementation
public void addOnPreDrawListener(OnPreDrawListener listener) {
 checkIsAlive();
 preDrawListeners.add(listener);
}

代码示例来源:origin: bumptech/glide

@Implementation
public void onAttachedToWindow() {
 for (OnAttachStateChangeListener listener : attachStateListeners) {
  listener.onViewAttachedToWindow(view);
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
 @SuppressWarnings("unused")
 public Bitmap getFrameAtTime() {
  Bitmap bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);
  Shadows.shadowOf(bitmap).appendDescription(" from MediaMetadataRetriever");
  return bitmap;
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
 public static Bitmap createBitmap(int width, int height, Bitmap.Config config) {
  // Robolectric doesn't match the framework behavior with null configs, so we have to do so
  // here.
  Preconditions.checkNotNull("Config must not be null");
  return ShadowBitmap.createBitmap(width, height, config);
 }
}

代码示例来源:origin: bumptech/glide

@Implementation
 public static Bitmap createBitmap(int width, int height, Bitmap.Config config) {
  Bitmap bitmap = ShadowBitmap.createBitmap(width, height, config);
  Shadows.shadowOf(bitmap).setMutable(true);
  return bitmap;
 }
}

相关文章