@tamer4lynx/tamer-host 0.0.2 → 0.0.3

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.
@@ -1,9 +1,6 @@
1
1
  package {{PACKAGE_NAME}}
2
2
 
3
3
  import android.os.Bundle
4
- import android.view.MotionEvent
5
- import android.view.inputmethod.InputMethodManager
6
- import android.widget.EditText
7
4
  import androidx.appcompat.app.AppCompatActivity
8
5
  import androidx.core.view.WindowCompat
9
6
  import androidx.core.view.WindowInsetsCompat
@@ -59,26 +56,6 @@ class MainActivity : AppCompatActivity() {
59
56
  GeneratedActivityLifecycle.onResume()
60
57
  }
61
58
 
62
- override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
63
- if (ev.action == MotionEvent.ACTION_DOWN) maybeClearFocusedInput(ev)
64
- return super.dispatchTouchEvent(ev)
65
- }
66
-
67
- private fun maybeClearFocusedInput(ev: MotionEvent) {
68
- val focused = currentFocus
69
- if (focused is EditText) {
70
- val loc = IntArray(2)
71
- focused.getLocationOnScreen(loc)
72
- val x = ev.rawX.toInt()
73
- val y = ev.rawY.toInt()
74
- if (x < loc[0] || x > loc[0] + focused.width || y < loc[1] || y > loc[1] + focused.height) {
75
- focused.clearFocus()
76
- (getSystemService(INPUT_METHOD_SERVICE) as? InputMethodManager)
77
- ?.hideSoftInputFromWindow(focused.windowToken, 0)
78
- }
79
- }
80
- }
81
-
82
59
  @Deprecated("Deprecated in Java")
83
60
  override fun onBackPressed() {
84
61
  GeneratedActivityLifecycle.onBackPressed { consumed ->
@@ -27,6 +27,9 @@ final class LynxInitProcessor {
27
27
 
28
28
  // GENERATED AUTOLINK END
29
29
 
30
+ // GENERATED DEV_CLIENT_SUPPORTED START
31
+ // GENERATED DEV_CLIENT_SUPPORTED END
32
+
30
33
  env.prepareConfig(globalConfig)
31
34
  }
32
35
 
@@ -50,6 +50,7 @@ class ViewController: UIViewController {
50
50
  private func setupLynxView() {
51
51
  let lv = buildLynxView()
52
52
  view.addSubview(lv)
53
+ TamerInsetsModule.attachHostView(lv)
53
54
  lv.loadTemplate(fromURL: "main.lynx.bundle", initData: nil)
54
55
  self.lynxView = lv
55
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamer4lynx/tamer-host",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "tag": "prerelease"