Skip to content

Commit

Permalink
🐛♿️ Fixed keyboard not displaying on address bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejaz4 committed Jan 3, 2022
1 parent 0564be2 commit 97cfa72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/co/dothq/browser/BrowserActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class BrowserActivity : AppCompatActivity() {
val session = GeckoSession()
val runtime = GeckoRuntime.create(this)


session.open(runtime)
view.setSession(session)
session.navigationDelegate = BrowserDelegates().createNavigationDelegate("main", this, applicationContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ class ApplicationManager {
return (thisContext as Activity).finish();
}
}

fun initBrowserRuntime() {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.content.Intent
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.view.inputmethod.InputMethodManager
import android.widget.EditText
import android.widget.Toast
Expand All @@ -25,10 +26,7 @@ class AddressBar : AppCompatActivity() {
editBox.setText(uri);

editBox.requestFocus();
val imm = getSystemService(
INPUT_METHOD_SERVICE
) as InputMethodManager
imm.showSoftInput(editBox, 0)
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
editBox.selectAll()

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

0 comments on commit 97cfa72

Please sign in to comment.