How do I make buttons clickable in the bottom sheet fragment?

**The flow: ** There are two xml files: activity_main.xml bottomsheet_fragment.xml I want to click on "click here" button (xml id: btn_show) and show the bottom sheet fragment [This is happening correctly) .. corresponding files: activity_main.xml, MainActivity.kt Now I want to click on the button in the bottom sheet(xml id: btn_button1), and show the text you… Read More How do I make buttons clickable in the bottom sheet fragment?

change text in android studio using viewBinding

I don’t know why text is not changing in the BirthdayGreetingActivity. No error is coming but it’s not changing text. I checked(by Logcat) that name has came successfully to BirthdayGreetingActivity.kt from MainActivity.kt. I guess that this [binding.birthdayGreeting.text = "Happy Birthday $name"] line in BirthdayGreetingActivity.kt is not working properly. MainActivity.kt — package com.example.firstapp import android.content.Intent import… Read More change text in android studio using viewBinding

convert myAdapter synthetic to viewbinding

i’m confused, how can i update my adapter views from synthetic to viewbinding! here is my code, how define viewbinding to viewHolder? class PlayersListAdapter( var items: ArrayList<MatchPlayer> ) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { val inflate: View = LayoutInflater.from(parent.context) .inflate(R.layout.item_team_player, parent, false) return MatchSubstitutionHolder(inflate) } override fun onBindViewHolder(viewHolder: RecyclerView.ViewHolder, position:… Read More convert myAdapter synthetic to viewbinding