mirror of
https://github.com/Corewala/Buran
synced 2024-12-22 07:42:43 +00:00
Fixed missing buttons in input dialog
This commit is contained in:
parent
d60c1a3b20
commit
e27526deaa
1 changed files with 7 additions and 8 deletions
|
@ -380,25 +380,24 @@ class GemActivity : AppCompatActivity() {
|
||||||
is GemState.AppQuery -> runOnUiThread { showAlert("App backdoor/query not implemented yet") }
|
is GemState.AppQuery -> runOnUiThread { showAlert("App backdoor/query not implemented yet") }
|
||||||
|
|
||||||
is GemState.ResponseInput -> runOnUiThread {
|
is GemState.ResponseInput -> runOnUiThread {
|
||||||
val builder = AlertDialog.Builder(this)
|
val builder = AlertDialog.Builder(this, R.style.AppDialogTheme)
|
||||||
val inflater: LayoutInflater = layoutInflater
|
val inflater: LayoutInflater = layoutInflater
|
||||||
val dialogLayout: View = inflater.inflate(R.layout.dialog_input_query, null)
|
val dialogLayout: View = inflater.inflate(R.layout.dialog_input_query, null)
|
||||||
val editText: EditText = dialogLayout.findViewById(R.id.query_input)
|
val editText: EditText = dialogLayout.findViewById(R.id.query_input)
|
||||||
editText.requestFocus()
|
editText.requestFocus()
|
||||||
editText.showKeyboard()
|
editText.showKeyboard()
|
||||||
loadingView(false)
|
loadingView(false)
|
||||||
with(builder) {
|
builder
|
||||||
setTitle(state.header.meta)
|
.setTitle(state.header.meta)
|
||||||
setPositiveButton("Ok"){ dialog, which ->
|
.setPositiveButton("Ok"){ dialog, which ->
|
||||||
request("${state.uri}?${Uri.encode(editText.text.toString())}")
|
request("${state.uri}?${Uri.encode(editText.text.toString())}")
|
||||||
editText.hideKeyboard()
|
editText.hideKeyboard()
|
||||||
}
|
}
|
||||||
setNegativeButton(getString(R.string.cancel)){ dialog, which ->
|
.setNegativeButton(getString(R.string.cancel)){ dialog, which ->
|
||||||
editText.hideKeyboard()
|
editText.hideKeyboard()
|
||||||
}
|
}
|
||||||
setView(dialogLayout)
|
.setView(dialogLayout)
|
||||||
show()
|
.show()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
is GemState.ClientCertRequired -> runOnUiThread {
|
is GemState.ClientCertRequired -> runOnUiThread {
|
||||||
|
|
Loading…
Reference in a new issue