本文整理了Java中org.robolectric.annotation.Implementation
类的一些代码示例,展示了Implementation
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Implementation
类的具体详情如下:
包路径:org.robolectric.annotation.Implementation
类名称:Implementation
暂无
代码示例来源:origin: robolectric/robolectric
@Implementation
protected boolean cancelDiscovery() {
isDiscovering = false;
return true;
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected boolean disable() {
enabled = false;
return true;
}
代码示例来源:origin: robolectric/robolectric
/** Returns whether this device has been bonded with. */
@Implementation
protected boolean createBond() {
return createdBond;
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void setPassword(boolean password) {
propertyFlags = (propertyFlags & ~PASSWORD_MASK) |
(password ? PASSWORD_MASK : 0);
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void setVisibleToUser(boolean isVisibleToUser) {
propertyFlags =
(propertyFlags & ~VISIBLE_TO_USER_MASK) | (isVisibleToUser ? VISIBLE_TO_USER_MASK : 0);
}
代码示例来源:origin: robolectric/robolectric
/**
* Overrides behavior of {@link getConnectedDevices}. Returns list of devices that is set up by
* call(s) to {@link ShadowBluetoothHeadset#addConnectedDevice}. Returns an empty list by default.
*/
@Implementation
protected List<BluetoothDevice> getConnectedDevices() {
return connectedDevices;
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void overridePendingTransition(int enterAnim, int exitAnim) {
pendingTransitionEnterAnimResId = enterAnim;
pendingTransitionExitAnimResId = exitAnim;
}
代码示例来源:origin: robolectric/robolectric
@Implementation(minSdk = N)
protected void registerDefaultNetworkCallback(
ConnectivityManager.NetworkCallback networkCallback) {
networkCallbacks.add(networkCallback);
}
代码示例来源:origin: robolectric/robolectric
/** @see #setLinkProperties(Network, LinkProperties) */
@Implementation(minSdk = LOLLIPOP)
protected LinkProperties getLinkProperties(Network network) {
return linkPropertiesMap.get(network);
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void postCallbackDelayed(
int callbackType, Runnable action, Object token, long delayMillis) {
handler.postDelayed(action, delayMillis);
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void unregisterContentObserver(ContentObserver observer) {
synchronized (contentObservers) {
for (ContentObserverEntry entry : contentObservers) {
if (entry.observer == observer) {
contentObservers.remove(entry);
}
}
}
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void eraseColor(int color) {
if (colors != null) {
Arrays.fill(colors, color);
}
}
代码示例来源:origin: robolectric/robolectric
@Implementation(minSdk = LOLLIPOP)
protected void removeDefaultNetworkActiveListener(ConnectivityManager.OnNetworkActiveListener l) {
if (l == null) {
throw new IllegalArgumentException("Invalid OnNetworkActiveListener");
}
if (onNetworkActiveListeners.contains(l)) {
onNetworkActiveListeners.remove(l);
}
}
代码示例来源:origin: robolectric/robolectric
@Implementation(minSdk = LOLLIPOP)
protected void addAction(AccessibilityAction action) {
if (action == null) {
return;
}
if (actionsArray == null) {
actionsArray = new ArrayList<>();
}
actionsArray.remove(action);
actionsArray.add(action);
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected Bitmap decodeRegion(Rect rect, BitmapFactory.Options options) {
return Bitmap.createBitmap(rect.width(), rect.height(),
options.inPreferredConfig != null ? options.inPreferredConfig : Bitmap.Config.ARGB_8888);
}
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!