Avoid some lint warnings

This commit is contained in:
Juha Heinanen
2021-11-07 10:11:44 +02:00
parent 04ea1fcf3c
commit 82fb3b7707
5 changed files with 8 additions and 8 deletions

View File

@ -20,7 +20,7 @@ class ChatsActivity: AppCompatActivity() {
internal lateinit var listView: ListView
private lateinit var clAdapter: ChatListAdapter
internal lateinit var peerUri: AutoCompleteTextView
internal lateinit var plusButton: ImageButton
private lateinit var plusButton: ImageButton
internal lateinit var aor: String
private var scrollPosition = -1

View File

@ -444,7 +444,7 @@ class ConfigActivity : AppCompatActivity() {
}
fun bindTitles() {
private fun bindTitles() {
binding.AutoStartTitle.setOnClickListener {
Utils.alertView(this, getString(R.string.start_automatically),
getString(R.string.start_automatically_help))

View File

@ -1378,8 +1378,7 @@ class MainActivity : AppCompatActivity() {
val input = layout.findViewById(R.id.password) as EditText
input.requestFocus()
val context = this
val builder = AlertDialog.Builder(this, R.style.AlertDialog)
with(builder) {
with (AlertDialog.Builder(this, R.style.AlertDialog)) {
setView(layout)
setPositiveButton(android.R.string.ok) { dialog, _ ->
imm.hideSoftInputFromWindow(input.windowToken, 0)
@ -1403,7 +1402,7 @@ class MainActivity : AppCompatActivity() {
imm.hideSoftInputFromWindow(input.windowToken, 0)
dialog.cancel()
}
val dialog = builder.create()
val dialog = this.create()
dialog.window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
dialog.show()
}
@ -1427,8 +1426,7 @@ class MainActivity : AppCompatActivity() {
val input = layout.findViewById(R.id.password) as EditText
input.requestFocus()
val context = this
val builder = AlertDialog.Builder(this, R.style.AlertDialog)
with(builder) {
with (AlertDialog.Builder(this, R.style.AlertDialog)) {
setView(layout)
setPositiveButton(android.R.string.ok) { dialog, _ ->
imm.hideSoftInputFromWindow(input.windowToken, 0)
@ -1448,7 +1446,7 @@ class MainActivity : AppCompatActivity() {
aorPasswords[aor] = ""
askPasswords(accounts)
}
val dialog = builder.create()
val dialog = this.create()
dialog.window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
dialog.show()
}

View File

@ -31,6 +31,7 @@
<ImageView
android:id="@+id/CardImageAvatar"
android:contentDescription="@string/avatar_image"
android:layout_height="36dp"
android:layout_width="36dp"
android:adjustViewBounds="true"

View File

@ -29,6 +29,7 @@
<ImageView
android:id="@+id/ImageAvatar"
android:contentDescription="@string/avatar_image"
android:layout_height="36dp"
android:layout_width="36dp"
android:adjustViewBounds="true"