Category : onclicklistener

I am working a RecyclerView item that has two views in it: a TextView and an ImagaView. I want to be able to click on both of them to cary out different functionalities. How can I go about this Here is my Adapter class AddMeasurementAdapter(private val currentList:MutableList<DressMeasurementModel>, private val listener1: RecyclerClickListener, private val listener2: RecyclerClickListener): ..

Read more

I have set up a ScrollView using RecyclerView for an arraylist of available episodes which I’m pulling from a local database, horizontal scrolling works without issue, swiping left or right on this screen switches to next or previous episode by using viewpager, but now I want the numbers bar to take me to the desired ..

Read more

i am currently working in a project in which i show muliple webviews behind carview in android studio i am able to change the title of in cardview if i write a new title it creates a scrollable block with the particular typed title but the backgroun image remain the same i want the background ..

Read more

i am currently working in a project in which i show multiple webviews behind cardview in android studio. i am able to change the title of cardview. if i write a new title it creates a scrollable block with the particular typed title, but the background image remains the same. i want the background image ..

Read more

If I understood correctly, the ViewModel is supposed to take care of all UI related data and UI events, if so, how can I accomplish this with RecyclerViews? In the Google samples of Architecture Components they make this happen through DataBinding, they create a variable called "viewModel" in the XML of the Fragment and the ..

Read more

I had my project at 29 sdk version and it was perfectly working, but I decided to upgrade to 30 and also my libraries and gradle, these are some of the major upgrades I did: gradle-7.0.2 com.android.tools.build:gradle:4.2.1 androidx.core:core-ktx:1.5.0 androidx.appcompat:appcompat:1.3.0 I fixed some deprecated code (mostly using the new startActivityForResult flow) But here’s my problem, after ..

Read more

I have an issue with buttons not performing desired actions using the programmed onClickListener. No buttons have the android:onClick="foo" statement in xml. The root navigation in my app is a viewpager2 component that swipes between two navigation graphs, could this be intercepting my button onClickListeners? The "home" fragment (i.e. defaultNavHost’s start destination) has no issues ..

Read more