I am new to android and I am testing on a app where I have a list-view which is populated using a baseadapter. I want to add a button inside each list-view item which when pressed should open different activities i.e if I am inside list-view 1 and press the button it should open activity 1. Inside list-view 2 if I press the button it should open activity 2 and like that so on for n list-view items there are n activities. Is it possible to do so?
Asked
Active
Viewed 36 times
1 Answers
1
If you allready created an Adapter, on your xml of your row_item.xml
or whatever you'll have to add a Button
, then you'll have to create a ViewHolder
and decalre there the Button
then you only will have to make the OnClickListener()
of the item clicked and then do your Intent
as your likes.
Here's an example of it and another example.

Community
- 1
- 1

Skizo-ozᴉʞS ツ
- 19,464
- 18
- 81
- 148
-
I think talking about the button that comes insids when the list item is clicked – user5551183 Nov 12 '15 at 05:03