I am working on android project using kotlin and xml. I have design a screen in where there are six menu like below
When I set visibility gone to the menu named "Chuti". Then the screen look likes below..
But my expected screen will be look like..
Here the activity file:
class ChutiActivity : AppCompatActivity() {
private lateinit var binding : ActivityChutiBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityChutiBinding.inflate(layoutInflater)
setContentView(binding.root)
binding.chutiTV.visibility = View.GONE
}
}
Please, help me.
you must remove the item and notifidatasetChange() your adapter. Add the below code to your adapter :