AutofillFragment: Explicitly declare type

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2019-07-30 06:15:56 +05:30
parent 80c397ef7b
commit d583609b28
No known key found for this signature in database
GPG key ID: C2E74282C2133D62

View file

@ -9,6 +9,7 @@ import android.content.pm.PackageManager
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.AdapterView
import android.widget.ArrayAdapter import android.widget.ArrayAdapter
import android.widget.EditText import android.widget.EditText
import android.widget.ListView import android.widget.ListView
@ -71,7 +72,8 @@ class AutofillFragment : DialogFragment() {
} }
(view.findViewById<View>(R.id.matched) as ListView).adapter = adapter (view.findViewById<View>(R.id.matched) as ListView).adapter = adapter
// delete items by clicking them // delete items by clicking them
(view.findViewById<View>(R.id.matched) as ListView).onItemClickListener = { _, _, position, _ -> adapter!!.remove(adapter!!.getItem(position)) } (view.findViewById<View>(R.id.matched) as ListView).onItemClickListener =
AdapterView.OnItemClickListener { _, _, position, _ -> adapter!!.remove(adapter!!.getItem(position)) }
// set the existing preference, if any // set the existing preference, if any
val prefs: SharedPreferences = if (!isWeb) { val prefs: SharedPreferences = if (!isWeb) {