user1385487
user1385487

Reputation: 65

Android Lazy list loading and clicks

I am looking for a better way of clicking, i have a lazy list that i am working on but for some reason i can only make the entire list per list line to be clickable and i would like to make different items in that list to be clickable per line lets say i have three pictures or two pictures in one line of the lazy list and make each of those clickable. right now am using this but it only makes my list clickable per line only

public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                long arg3) {
             switch (arg2)
             {
                case 0:
                 Intent newActivity0 = new Intent(AmainActivityFractals.this,FractalsTwoOne.class);     
                 startActivity(newActivity0);
                break;
                case 1:
                 Intent newActivity1 = new Intent(AmainActivityFractals.this,FractalsTwoTwo.class);     
                 startActivity(newActivity1);
                break;

does someone know a better aproach? thank you

Upvotes: 0

Views: 527

Answers (1)

jmhend
jmhend

Reputation: 537

Very similar question here.

Basically add the onClickListeners() for your buttons to your list adapter when you're inflating the list item Views.

Upvotes: 1

Related Questions