Skip to content

Commit 97cfa72

Browse files
committed
🐛♿️ Fixed keyboard not displaying on address bar.
1 parent 0564be2 commit 97cfa72

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

app/src/main/java/co/dothq/browser/BrowserActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class BrowserActivity : AppCompatActivity() {
3636
val session = GeckoSession()
3737
val runtime = GeckoRuntime.create(this)
3838

39-
4039
session.open(runtime)
4140
view.setSession(session)
4241
session.navigationDelegate = BrowserDelegates().createNavigationDelegate("main", this, applicationContext);

app/src/main/java/co/dothq/browser/managers/ApplicationManager.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ class ApplicationManager {
2121
return (thisContext as Activity).finish();
2222
}
2323
}
24+
25+
fun initBrowserRuntime() {
26+
27+
}
2428
}

app/src/main/java/co/dothq/browser/subactivities/AddressBar.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import android.content.Intent
66
import android.os.Bundle
77
import android.view.KeyEvent
88
import android.view.View
9+
import android.view.WindowManager
910
import android.view.inputmethod.InputMethodManager
1011
import android.widget.EditText
1112
import android.widget.Toast
@@ -25,10 +26,7 @@ class AddressBar : AppCompatActivity() {
2526
editBox.setText(uri);
2627

2728
editBox.requestFocus();
28-
val imm = getSystemService(
29-
INPUT_METHOD_SERVICE
30-
) as InputMethodManager
31-
imm.showSoftInput(editBox, 0)
29+
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
3230
editBox.selectAll()
3331

3432
editBox.setOnKeyListener(View.OnKeyListener { v, keyCode, event ->

0 commit comments

Comments
 (0)