-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
931ef9c
commit f64719b
Showing
9 changed files
with
127 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+4.45 KB
...s/io.fabianterhorst.isometric.screenshot.IsometricViewTest_doScreenshotKnot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.54 KB
...abianterhorst.isometric.screenshot.IsometricViewTest_doScreenshotOctahedron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.28 KB
.../io.fabianterhorst.isometric.screenshot.IsometricViewTest_doScreenshotPrism.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.51 KB
...o.fabianterhorst.isometric.screenshot.IsometricViewTest_doScreenshotPyramid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.86 KB
...io.fabianterhorst.isometric.screenshot.IsometricViewTest_doScreenshotStairs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.37 KB
(80%)
...ts/io.fabianterhorst.isometric.screenshot.IsometricViewTest_doScreenshotTwo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
lib/src/androidTest/java/io/fabianterhorst/isometric/screenshot/util/ScreenshotHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.fabianterhorst.isometric.screenshot.util; | ||
|
||
import android.view.View; | ||
|
||
import com.facebook.testing.screenshot.Screenshot; | ||
import com.facebook.testing.screenshot.ViewHelpers; | ||
|
||
/** | ||
* Created by fabianterhorst on 05.04.17. | ||
*/ | ||
|
||
public class ScreenshotHelper { | ||
|
||
public static void measureAndScreenshotView(View view, int width, int height) { | ||
ViewHelpers.setupView(view) | ||
.setExactWidthPx(width) | ||
.setExactHeightPx(height) | ||
.layout(); | ||
Screenshot.snap(view) | ||
.record(); | ||
} | ||
} |