skip to Main Content

Android Studio – Up Navigation in android

When I'm pressing the back button on phone or the support action bar, it's exiting the application. How can I fix it to return to the main activity In login code: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_login) supportActionBar?.setDisplayShowHomeEnabled(true) ....…

VIEW QUESTION

Firebase(with Kotlin) ArrayList Casting Error

I'm developing a basic shopping app with Kotlin. And I'm using Firebase to upload and retrieve "bought products" ArrayList. I'm uploading it like this: val productId = productList.get(position).id boughtProductArray.add(productId) document.update("boughtItems",boughtProductArray) And retrieving like this: db.collection("gamevalues").document(userId).addSnapshotListener{snapshot, error-> if(error!=null){ Toast.makeText(holder.itemView.context,error.localizedMessage,Toast.LENGTH_LONG).show() }else{ if(snapshot!=null…

VIEW QUESTION
Back To Top
Search