Comments (2)
Hey 👋 @tdrhq
Revisiting this one, the solution you suggested wasn't feasible because subclasses of TextureView
cannot do their own rendering with the Canvas
object so I opted to create both Bitmap
s and do a simple merge.
How does that sound? Do you see any drawbacks?
It still remains adding a way to get a Bitmap
from SurfaceView
s, but at least TextureView
s are unblocked.
Happy to know what you think about #71
Thanks a lot!
from screenshot-tests-for-android.
So, I'm not a TextureView/SurfaceView expert, but based on your description you seem to be on the right path, and I'd love to have the eventual fix pulled in.
In this particular case, it looks like the View is drawing over your TextureView, probably because you have a view behind the TextureView which in production will be drawn first, but in your code is drawn after the TextureView.. something like this
- BackgroundView
- TitleBar
- TextureView
- MapboxImage
The solution will be to draw the TextureView while drawing the rest of the views, which might be tricky (since it's the draw() that dispatches the draw() for the children). Perhaps a ScreenshotSafeTextureView that detects if it's running in a screenshot test and in which case just do the logic you showed inside of its onDraw() method?
from screenshot-tests-for-android.
Related Issues (20)
- verifyDebugAndroidTestScreenshotTest:RuntimeError HOT 1
- java.lang.OutOfMemoryError: Failed to allocate a 8781536 byte allocation with 4981712 free bytes and 4MB until OOM, max allowed footprint 536870912, growth limit 536870912 at java.util.Arrays.copyOf(Arrays.java:3260) HOT 2
- Library forces arbitrarily small image width HOT 1
- Found 0 Screenshots
- Recording a single test deletes all other screenshots
- Fail to execute runDebugAndroidTestScreenshotTest due to syntax error HOT 1
- Add support to Kotlin DSL
- RunScreenshotTestTask doesn't support configuration cache
- Performance?
- Value error: Operation on closed image when recording/verifying screenshots HOT 2
- Can't record very large view inside ScrollView HOT 4
- Screenshot record fails because of --> "Accessibility content change on non-UI thread"
- Is it possible to hideout dynamic content on the screen before capturing screenshot HOT 1
- Is it possible to vertical scroll and capture full screen
- Incorrect accessibility actions checks in `AccessibilityUtil`
- How to run plugin tests (plugin:check)
- How to install all the artifacts to local maven repository
- plugin id 'com.facebook.testing.screenshot:plugin' version '0.14.0' apply false Fail for android DSL files
- Add SurfaceView support
- test failure: Is your sdcard directory read-only?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from screenshot-tests-for-android.