react-native-rectangle-doc-scanner 3.155.0 → 3.157.0
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.
|
@@ -61,21 +61,45 @@ class DocumentScannerView(context: ThemedReactContext) : FrameLayout(context), L
|
|
|
61
61
|
override fun getLifecycle(): Lifecycle = lifecycleRegistry
|
|
62
62
|
|
|
63
63
|
init {
|
|
64
|
+
Log.d(TAG, "╔════════════════════════════════════════╗")
|
|
65
|
+
Log.d(TAG, "║ DocumentScannerView INIT START ║")
|
|
66
|
+
Log.d(TAG, "╚════════════════════════════════════════╝")
|
|
67
|
+
Log.d(TAG, "[INIT] Context: $context")
|
|
68
|
+
Log.d(TAG, "[INIT] Context class: ${context.javaClass.name}")
|
|
69
|
+
|
|
64
70
|
// Initialize lifecycle FIRST
|
|
71
|
+
Log.d(TAG, "[INIT] Setting lifecycle to INITIALIZED...")
|
|
65
72
|
lifecycleRegistry.currentState = Lifecycle.State.INITIALIZED
|
|
73
|
+
Log.d(TAG, "[INIT] Lifecycle state: ${lifecycleRegistry.currentState}")
|
|
66
74
|
|
|
67
75
|
// Create preview view
|
|
76
|
+
Log.d(TAG, "[INIT] Creating PreviewView...")
|
|
68
77
|
previewView = PreviewView(context).apply {
|
|
69
78
|
layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
70
79
|
scaleType = PreviewView.ScaleType.FILL_CENTER
|
|
71
80
|
}
|
|
81
|
+
Log.d(TAG, "[INIT] PreviewView created: $previewView")
|
|
82
|
+
|
|
83
|
+
Log.d(TAG, "[INIT] Adding PreviewView to parent...")
|
|
72
84
|
addView(previewView)
|
|
85
|
+
Log.d(TAG, "[INIT] PreviewView added, childCount: $childCount")
|
|
73
86
|
|
|
74
87
|
// Create overlay view for drawing rectangle
|
|
88
|
+
Log.d(TAG, "[INIT] Creating OverlayView...")
|
|
75
89
|
overlayView = OverlayView(context)
|
|
90
|
+
Log.d(TAG, "[INIT] OverlayView created: $overlayView")
|
|
91
|
+
|
|
92
|
+
Log.d(TAG, "[INIT] Adding OverlayView to parent...")
|
|
76
93
|
addView(overlayView)
|
|
94
|
+
Log.d(TAG, "[INIT] OverlayView added, childCount: $childCount")
|
|
77
95
|
|
|
96
|
+
Log.d(TAG, "[INIT] Setting lifecycle to CREATED...")
|
|
78
97
|
lifecycleRegistry.currentState = Lifecycle.State.CREATED
|
|
98
|
+
Log.d(TAG, "[INIT] Lifecycle state: ${lifecycleRegistry.currentState}")
|
|
99
|
+
|
|
100
|
+
Log.d(TAG, "╔════════════════════════════════════════╗")
|
|
101
|
+
Log.d(TAG, "║ DocumentScannerView INIT COMPLETE ║")
|
|
102
|
+
Log.d(TAG, "╚════════════════════════════════════════╝")
|
|
79
103
|
}
|
|
80
104
|
|
|
81
105
|
override fun onAttachedToWindow() {
|
package/android/src/main/kotlin/com/reactnativerectangledocscanner/DocumentScannerViewManager.kt
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package com.reactnativerectangledocscanner
|
|
2
2
|
|
|
3
3
|
import android.graphics.Color
|
|
4
|
+
import android.util.Log
|
|
4
5
|
import com.facebook.react.bridge.ReadableArray
|
|
5
6
|
import com.facebook.react.common.MapBuilder
|
|
6
7
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
@@ -11,12 +12,19 @@ class DocumentScannerViewManager : SimpleViewManager<DocumentScannerView>() {
|
|
|
11
12
|
|
|
12
13
|
companion object {
|
|
13
14
|
const val REACT_CLASS = "RNPdfScanner"
|
|
15
|
+
private const val TAG = "DocScannerViewManager"
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
override fun getName() = REACT_CLASS
|
|
17
19
|
|
|
18
20
|
override fun createViewInstance(reactContext: ThemedReactContext): DocumentScannerView {
|
|
19
|
-
|
|
21
|
+
Log.d(TAG, "╔════════════════════════════════════════╗")
|
|
22
|
+
Log.d(TAG, "║ createViewInstance CALLED ║")
|
|
23
|
+
Log.d(TAG, "╚════════════════════════════════════════╝")
|
|
24
|
+
Log.d(TAG, "[CREATE] reactContext: $reactContext")
|
|
25
|
+
val view = DocumentScannerView(reactContext)
|
|
26
|
+
Log.d(TAG, "[CREATE] DocumentScannerView created: $view")
|
|
27
|
+
return view
|
|
20
28
|
}
|
|
21
29
|
|
|
22
30
|
@ReactProp(name = "overlayColor", customType = "Color")
|
package/package.json
CHANGED