Added type to view variables
This commit is contained in:
@ -19,8 +19,8 @@ class AccountListAdapter(private val cxt: Context, private val rows: ArrayList<A
|
||||
private val layoutInflater = LayoutInflater.from(context)
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val aorView = view?.findViewById(R.id.aor) as TextView
|
||||
val actionView = view?.findViewById(R.id.action) as ImageButton
|
||||
val aorView: TextView = view?.findViewById(R.id.aor)!!
|
||||
val actionView: ImageButton = view?.findViewById(R.id.action)!!
|
||||
}
|
||||
|
||||
override fun getView(position: Int, view: View?, parent: ViewGroup): View {
|
||||
|
||||
@ -16,9 +16,9 @@ class AndroidUriListAdapter(private val ctx: Context, private val rows: ArrayLis
|
||||
private val layoutInflater = LayoutInflater.from(context)
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val uriView = view?.findViewById(R.id.uri) as TextView
|
||||
val messageView = view?.findViewById(R.id.message) as ImageButton
|
||||
val callView = view?.findViewById(R.id.call) as ImageButton
|
||||
val uriView: TextView = view?.findViewById(R.id.uri)!!
|
||||
val messageView: ImageButton = view?.findViewById(R.id.message)!!
|
||||
val callView: ImageButton = view?.findViewById(R.id.call)!!
|
||||
}
|
||||
|
||||
override fun getView(position: Int, view: View?, parent: ViewGroup): View {
|
||||
|
||||
@ -2,7 +2,6 @@ package com.tutpro.baresip
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Typeface
|
||||
import android.media.AudioAttributes
|
||||
import android.media.MediaPlayer
|
||||
import android.text.format.DateUtils
|
||||
@ -28,9 +27,9 @@ class CallDetailsAdapter(private val ctx: Context, private val rows: ArrayList<C
|
||||
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val directionView = view?.findViewById(R.id.direction) as ImageView
|
||||
val timeView = view?.findViewById(R.id.time) as TextView
|
||||
val durationView = view?.findViewById(R.id.duration) as TextView
|
||||
val directionView: ImageView = view?.findViewById(R.id.direction)!!
|
||||
val timeView: TextView = view?.findViewById(R.id.time)!!
|
||||
val durationView: TextView = view?.findViewById(R.id.duration)!!
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
|
||||
@ -19,12 +19,12 @@ class CallListAdapter(private val ctx: Context, private val account: Account,
|
||||
private val layoutInflater = LayoutInflater.from(context)
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val textAvatarView = view?.findViewById(R.id.TextAvatar) as TextView
|
||||
val imageAvatarView = view?.findViewById(R.id.ImageAvatar) as ImageView
|
||||
val directionsView = view?.findViewById(R.id.directions) as LinearLayout
|
||||
val etcView = view?.findViewById(R.id.etc) as TextView
|
||||
val peerURIView = view?.findViewById(R.id.peer_uri) as TextView
|
||||
val timeView = view?.findViewById(R.id.time) as TextView
|
||||
val textAvatarView: TextView = view?.findViewById(R.id.TextAvatar)!!
|
||||
val imageAvatarView: ImageView = view?.findViewById(R.id.ImageAvatar)!!
|
||||
val directionsView: LinearLayout = view?.findViewById(R.id.directions)!!
|
||||
val etcView: TextView = view?.findViewById(R.id.etc)!!
|
||||
val peerURIView: TextView = view?.findViewById(R.id.peer_uri)!!
|
||||
val timeView: TextView = view?.findViewById(R.id.time)!!
|
||||
}
|
||||
|
||||
override fun getView(position: Int, view: View?, parent: ViewGroup): View {
|
||||
|
||||
@ -20,12 +20,12 @@ class ChatListAdapter(private val ctx: Context, private val account: Account, pr
|
||||
private val layoutInflater = LayoutInflater.from(context)
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val textAvatarView = view?.findViewById(R.id.TextAvatar) as TextView
|
||||
val imageAvatarView = view?.findViewById(R.id.ImageAvatar) as ImageView
|
||||
val layoutView = view?.findViewById(R.id.chat) as LinearLayout
|
||||
val peerView = view?.findViewById(R.id.peer) as TextView
|
||||
val infoView = view?.findViewById(R.id.info) as TextView
|
||||
val textView = view?.findViewById(R.id.text) as TextView
|
||||
val textAvatarView: TextView = view?.findViewById(R.id.TextAvatar)!!
|
||||
val imageAvatarView: ImageView = view?.findViewById(R.id.ImageAvatar)!!
|
||||
val layoutView: LinearLayout = view?.findViewById(R.id.chat)!!
|
||||
val peerView: TextView = view?.findViewById(R.id.peer)!!
|
||||
val infoView: TextView = view?.findViewById(R.id.info)!!
|
||||
val textView: TextView = view?.findViewById(R.id.text)!!
|
||||
}
|
||||
|
||||
override fun getView(position: Int, view: View?, parent: ViewGroup): View {
|
||||
|
||||
@ -91,7 +91,7 @@ class CodecsActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
private val itemTouchHelper by lazy {
|
||||
val simpleItemTouchCallback = object : ItemTouchHelper.SimpleCallback(
|
||||
val simpleItemTouchCallback = object : SimpleCallback(
|
||||
UP or DOWN or START or END, RIGHT) {
|
||||
|
||||
override fun onMove(
|
||||
|
||||
@ -28,10 +28,10 @@ class ContactListAdapter(private val ctx: Context, private val rows: ArrayList<C
|
||||
private var lastClick: Long = 0
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val textAvatarView = view?.findViewById(R.id.TextAvatar) as TextView
|
||||
val imageAvatarView = view?.findViewById(R.id.ImageAvatar) as ImageView
|
||||
val nameView = view?.findViewById(R.id.contactName) as TextView
|
||||
val actionView = view?.findViewById(R.id.edit) as ImageButton
|
||||
val textAvatarView: TextView = view?.findViewById(R.id.TextAvatar)!!
|
||||
val imageAvatarView: ImageView = view?.findViewById(R.id.ImageAvatar)!!
|
||||
val nameView: TextView = view?.findViewById(R.id.contactName)!!
|
||||
val actionView: ImageButton = view?.findViewById(R.id.edit)!!
|
||||
}
|
||||
|
||||
override fun getView(position: Int, view: View?, parent: ViewGroup): View {
|
||||
|
||||
@ -24,9 +24,9 @@ class MessageListAdapter(private val ctx: Context, private val peerUri: String,
|
||||
private val layoutInflater = LayoutInflater.from(context)
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val layoutView = view?.findViewById(R.id.message) as LinearLayout
|
||||
val infoView = view?.findViewById(R.id.info) as TextView
|
||||
val textView = view?.findViewById(R.id.text) as TextView
|
||||
val layoutView: LinearLayout = view?.findViewById(R.id.message)!!
|
||||
val infoView: TextView = view?.findViewById(R.id.info)!!
|
||||
val textView: TextView = view?.findViewById(R.id.text)!!
|
||||
}
|
||||
|
||||
override fun getView(position: Int, view: View?, parent: ViewGroup): View {
|
||||
|
||||
@ -15,8 +15,8 @@ class UaSpinnerAdapter(cxt: Context, private val uas: ArrayList<UserAgent>) :
|
||||
private val layoutInflater = LayoutInflater.from(context)
|
||||
|
||||
private class ViewHolder(view: View?) {
|
||||
val textView = view?.findViewById(R.id.spinnerText) as TextView
|
||||
val imageView = view?.findViewById(R.id.spinnerImage) as ImageView
|
||||
val textView: TextView = view?.findViewById(R.id.spinnerText)!!
|
||||
val imageView: ImageView = view?.findViewById(R.id.spinnerImage)!!
|
||||
}
|
||||
|
||||
override fun getDropDownView(position: Int, view: View?, parent: ViewGroup): View {
|
||||
|
||||
Reference in New Issue
Block a user