@repliqo/sdk-react-native 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,6 +103,17 @@ public class FullContentCapture {
103
103
  return viewportFallback(activity);
104
104
  }
105
105
 
106
+ // Force the content view to measure and layout at its full
107
+ // height. React Native's ScrollView optimization may skip
108
+ // laying out off-screen children, causing draw() to only
109
+ // render the visible portion. This forces a full layout pass.
110
+ int widthSpec = View.MeasureSpec.makeMeasureSpec(
111
+ contentWidth, View.MeasureSpec.EXACTLY);
112
+ int heightSpec = View.MeasureSpec.makeMeasureSpec(
113
+ captureHeight, View.MeasureSpec.EXACTLY);
114
+ contentView.measure(widthSpec, heightSpec);
115
+ contentView.layout(0, 0, contentWidth, captureHeight);
116
+
106
117
  // Create bitmap — wrapped in OOM catch
107
118
  Bitmap bitmap;
108
119
  try {
@@ -120,6 +131,10 @@ public class FullContentCapture {
120
131
  // Draw the full content
121
132
  contentView.draw(canvas);
122
133
 
134
+ // Restore the original layout so the UI isn't affected.
135
+ // requestLayout triggers an async re-layout on the next frame.
136
+ contentView.requestLayout();
137
+
123
138
  // Compress to JPEG
124
139
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
125
140
  bitmap.compress(Bitmap.CompressFormat.JPEG, JPEG_QUALITY, baos);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repliqo/sdk-react-native",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Session replay & analytics SDK for React Native. Captures screenshots (including modals/alerts), navigation, screen visits, and custom events.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",