Комментарии:
Thank You very much, Sir 🤍
Ответитьgreat
ОтветитьWhat should I do if I only want to implement to onQueryTextSubmit method?
ОтветитьThank you. Your videos are really good!
Ответитьi dont have buildfeature in my gradle
ОтветитьGreat Video!!, How would you procede to add click listeners to each user name, to direct to other activity?
ОтветитьHow to clear text
Ответитьthank you so much sir
ОтветитьUseful
ОтветитьHow to show hint one by one like instagram use to show text hint one by one in vertically manner. Please help..
Texts are shown:-
Search 'pictures'
Search 'dogs'
Search 'animation'
Please help...
very understandable explanation... thanks a lot
ОтветитьHow can i implement a searchview in a fragment? with recycler view
ОтветитьUnderrated channel. Explains very well.
ОтветитьHello, if i have an recyclerview instead an listview It's the same thing?
ОтветитьHow are you: This is a list view How do I add a search?
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.pro.app.health.Controlar.SleepAdapter
import kotlinx.android.synthetic.main.activity_sleep.*
import java.util.*
class Sleep : AppCompatActivity() {
var listofsleep= ArrayList<ModleSleep>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_sleep)
var adaptersleep = SleepAdapter(this,listofsleep)
lvsleep.adapter = adaptersleep
listofsleep.add(ModleSleep(getString(R.string.SleepAnalysis), getString(R.string.SleepAnalysisDes)))
listofsleep.add(ModleSleep(getString(R.string.SleepAnalysis), getString(R.string.SleepAnalysisDes)))
listofsleep.add(ModleSleep(getString(R.string.SleepAnalysis), getString(R.string.SleepAnalysisDes)))
listofsleep.add(ModleSleep(getString(R.string.SleepAnalysis), getString(R.string.SleepAnalysisDes)))
listofsleep.add(ModleSleep(getString(R.string.SleepAnalysis), getString(R.string.SleepAnalysisDes)))
}
}
import android.content.Intent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ArrayAdapter
import com.pro.app.health.*
import kotlinx.android.synthetic.main.list_sleep.view.*
class SleepAdapter:ArrayAdapter<ModleSleep> {
constructor(context: Sleep, sleep: ArrayList<ModleSleep>) : super(context, 0, sleep)
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
var listviewsleep: View = LayoutInflater.from(context).inflate(R.layout.list_sleep, parent, false)
var name3: String? = null
var des3: String? = null;
var ModleSleep = getItem(position)
name3 = ModleSleep?.name3
des3 = ModleSleep?.des3
listviewsleep.tvsleep.text = name3
listviewsleep.Sdescription.text = des3
listviewsleep.onclicksleep.setOnClickListener {
val intent= Intent(context, onclicksleep::class.java)
intent.putExtra("dessleep",des3)
context!!.startActivity(intent)
}
return listviewsleep
}
}
class ModleSleep(var name3: String,var des3:String)
how change coloror size hint search view ?
i need change the color
Many thanks!
ОтветитьHow to change search query hint color ?
ОтветитьThankyou sir.. :D
ОтветитьI'm trying to use this for my to do list app. So the data generated is user data. What should I replace in "arrayOf()"?
Ответить