コード例 #1
0
 public static void resetStaticState() {
   ShadowWrangler.getInstance().silence();
   Robolectric.application = new Application();
   ShadowBitmapFactory.reset();
   ShadowDrawable.reset();
   ShadowMediaStore.reset();
   ShadowLog.reset();
   ShadowContext.clearFilesAndCache();
   ShadowLooper.resetThreadLoopers();
 }
コード例 #2
0
ファイル: Robolectric.java プロジェクト: WeiBanjo/robolectric
 public static void resetStaticState() {
   ShadowWrangler.getInstance().silence();
   Robolectric.application = new Application();
   ShadowBitmapFactory.reset();
   ShadowDrawable.reset();
   ShadowMediaStore.reset();
   ShadowLog.reset();
   ShadowContext.clearFilesAndCache();
   ShadowLooper.resetThreadLoopers();
   ShadowDialog.reset();
   ShadowContentResolver.reset();
   ShadowLocalBroadcastManager.reset();
   ShadowMimeTypeMap.reset();
   ShadowPowerManager.reset();
   ShadowStatFs.reset();
   ShadowTypeface.reset();
 }
コード例 #3
0
 public CompoundDrawables(int left, int top, int right, int bottom) {
   leftDrawable = left != 0 ? ShadowDrawable.createFromResourceId(left) : null;
   topDrawable = top != 0 ? ShadowDrawable.createFromResourceId(top) : null;
   rightDrawable = right != 0 ? ShadowDrawable.createFromResourceId(right) : null;
   bottomDrawable = bottom != 0 ? ShadowDrawable.createFromResourceId(bottom) : null;
 }