Made dialog buttons uppercase in line with Material Design

This commit is contained in:
Corewala 2022-05-05 10:19:03 -04:00
parent 1275136433
commit 95d6e92a04
1 changed files with 10 additions and 10 deletions

View File

@ -389,11 +389,11 @@ class GemActivity : AppCompatActivity() {
loadingView(false) loadingView(false)
builder builder
.setTitle(state.header.meta) .setTitle(state.header.meta)
.setPositiveButton(getString(R.string.confirm)){ dialog, which -> .setPositiveButton(getString(R.string.confirm).toUpperCase()){ 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).toUpperCase()){ dialog, which ->
editText.hideKeyboard() editText.hideKeyboard()
} }
.setView(dialogLayout) .setView(dialogLayout)
@ -409,14 +409,14 @@ class GemActivity : AppCompatActivity() {
if(prefs.getString(Buran.PREF_KEY_CLIENT_CERT_HUMAN_READABLE, null) != null){ if(prefs.getString(Buran.PREF_KEY_CLIENT_CERT_HUMAN_READABLE, null) != null){
builder builder
.setPositiveButton(getString(R.string.use_client_certificate)) { _, _ -> .setPositiveButton(getString(R.string.use_client_certificate).toUpperCase()) { _, _ ->
model.request(state.uri.toString(), true) model.request(state.uri.toString(), true)
} }
.setNegativeButton(getString(R.string.cancel)) { _, _ -> } .setNegativeButton(getString(R.string.cancel).toUpperCase()) { _, _ -> }
.show() .show()
}else{ }else{
builder builder
.setNegativeButton(getString(R.string.close)) { _, _ -> } .setNegativeButton(getString(R.string.close).toUpperCase()) { _, _ -> }
.show() .show()
} }
} }
@ -449,11 +449,11 @@ class GemActivity : AppCompatActivity() {
AlertDialog.Builder(this, R.style.AppDialogTheme) AlertDialog.Builder(this, R.style.AppDialogTheme)
.setTitle("$download: ${state.header.meta}") .setTitle("$download: ${state.header.meta}")
.setMessage("${state.uri}") .setMessage("${state.uri}")
.setPositiveButton(getString(R.string.download)) { _, _ -> .setPositiveButton(getString(R.string.download).toUpperCase()) { _, _ ->
loadingView(true) loadingView(true)
model.requestBinaryDownload(state.uri) model.requestBinaryDownload(state.uri)
} }
.setNegativeButton(getString(R.string.cancel)) { _, _ -> } .setNegativeButton(getString(R.string.cancel).toUpperCase()) { _, _ -> }
.show() .show()
}else{ }else{
Snackbar.make(binding.root, getString(R.string.no_internet), Snackbar.LENGTH_LONG).show() Snackbar.make(binding.root, getString(R.string.no_internet), Snackbar.LENGTH_LONG).show()
@ -470,11 +470,11 @@ class GemActivity : AppCompatActivity() {
AlertDialog.Builder(this, R.style.AppDialogTheme) AlertDialog.Builder(this, R.style.AppDialogTheme)
.setTitle(R.string.unknown_host_dialog_title) .setTitle(R.string.unknown_host_dialog_title)
.setMessage("Host not found: ${state.uri}\n\nSearch with TLGS instead?") .setMessage("Host not found: ${state.uri}\n\nSearch with TLGS instead?")
.setPositiveButton(getString(R.string.search)) { _, _ -> .setPositiveButton(getString(R.string.search).toUpperCase()) { _, _ ->
loadingView(true) loadingView(true)
omniTerm.search(state.uri.toString(), searchbase) omniTerm.search(state.uri.toString(), searchbase)
} }
.setNegativeButton(getString(R.string.cancel)) { _, _ -> } .setNegativeButton(getString(R.string.cancel).toUpperCase()) { _, _ -> }
.show() .show()
} }
} }
@ -512,7 +512,7 @@ class GemActivity : AppCompatActivity() {
AlertDialog.Builder(this) AlertDialog.Builder(this)
.setTitle(getString(R.string.error)) .setTitle(getString(R.string.error))
.setMessage(message) .setMessage(message)
.setPositiveButton(getString(R.string.close)){ _, _ -> .setPositiveButton(getString(R.string.close).toUpperCase()){ _, _ ->
} }
.show() .show()