<prompt> Unda programu ya Kotlin Android ambayo inaruhusu watumiaji kuunda na kudhibiti orodha rahisi ya mambo ya kufanya. Hifadhi kazi katika hifadhidata ya karibu ya SQLite na utekeleze vipengele kama vile kuongeza, kuhariri, kufuta na kutia alama kazi kama zimekamilika. Jumuisha vipengele vinavyofaa vya kiolesura na ukaguzi wa uthibitishaji.PLINFORMAT  <response>: Darasa la data ya kaziEntitytableName kaziKazi ya darasa la data PrimaryKeyautoGenerate kweli kitambulisho halali: Int, jina la valve: kamba, maelezo ya valve: kamba, val imekamilika: Boolean Kiolesura cha TaskDaoDaointerface TaskDao QueryCHAGUA KUTOKA kwa kazi fun getAllTasks: LiveData Ingiza sitisha kufurahisha kuingizaTaskkazi: Kazi Sasisha sitisha sasisho la kufurahishaTaskkazi: Kazi Futa sitisha Furaha ya kufutaTaskkazi: Kazi Darasa la HifadhidataDatabasevyombo Kazi::darasa, toleo 1abstract class AppDatabase : RoomDatabase abstract fun taskDao: TaskDao kitu mwenza private var ANCE: AppDatabase? null fun getInstancemuktadha: Muktadha: AppDatabase ikiwa ANCE null iliyosawazishwa AppDatabase::class ANCE Room.databaseBuilder muktadha.matumiziMuktadha, AppDatabase::class.java, kazi_database .jenga rudisha ANCE!! TaskViewModel darasadarasa la TaskViewModelmaombi: Maombi : AndroidViewModelmaombi val taskDao AppDatabase.getInstanceapplication.taskDao kazi za kawaida: LiveData taskDao.getAllTasks sitisha kufurahisha kuingizaTaskkazi: Task taskDao.insertTaskkazi sitisha sasisho la kufurahishaTaskkazi: Kazi taskDao.updateTaskkazi simamisha kazi ya kufurahisha ya kufuta kazi: Kazi taskDao.deleteTaskkazi Darasa la Adapta ya KaziAdapta ya Kazi ya darasa mtazamo wa val binafsi: TaskViewModel : OrodhaAdaptaTaskDiffCallback darasa la ndani TaskViewHolderitemView: View : RecyclerView.ViewHolderitemView ... futa furaha kwenyeCreateViewHoldermzazi: ViewGroup, viewType: Int: TaskViewHolder ... futa furaha kwenyeBindViewHoldermshikaji: TaskViewHolder, nafasi: Int ... class TaskDiffCallback : DiffUtil.ItemCallback batilisha furaha areItemsTheSameoldItem: Task, newItem: Task: Boolean ... kubatilisha furaha areContentsTheSameoldItem: Task, newItem: Task: Boolean ... Shughuli kuu.ktdarasa la Shughuli kuu : AppCompatActivity Private lateinit var viewModel: TaskViewModel adapta ya kibinafsi ya lateinit var: TaskAdapter kubatilisha furaha onCreatesavedInstanceState: Bundle? super.onCreatesavedInstanceState setContentViewR.layout.activity_main viewModel ViewModelProviderhii.getTaskViewModel::class.java setupRecyclerView Sanidi visikilizaji vya kubofya kwa ajili ya kuongeza, kuhariri, na kufuta kazi usanidi wa kibinafsi wa kufurahishaRecyclerView val recyclerView findViewByIdR.id.recycler_view adapta TaskAdapterviewModel recyclerView.adapter adapta recyclerView.layoutManager LinearLayoutManager hii viewModel.tasks.observehii tasks - Adapter.submitListkazi 