Sunday, December 2, 2012

How to use intent in an adapter class in Android

We can easily use intent in an Adapter class.

// This is 2 line code
Intent i = new Intent(v.getContext(), DetailStores.class);
v.getContext().startActivity(i);

//Same code we can write in an single line
v.getContext().startActivity(new Intent(v.getContext(), DetailStores.class));

No comments:

Post a Comment