How to implement alphabetical Section RecyclerView in android without any external library? - android

Hello all am new for android development am trying to make section recyclerview header like items must comes under first charc how can i achieve this so far i have done this with third party library now i like to do it myself please someone help me how to do this here what i have tried before:
public class accountheader extends StatelessSection implements View.OnClickListener{
private accountheader.OnItemClickListener onItemClickListener;
String title;
List<AccountModel> listobj;
Context context;
public accountheader(String title, List<AccountModel> list, Context context) {
super(R.layout.section_ex1_header, R.layout.recyclerviewitem);
this.title = title;
this.listobj = list;
this.context=context;
}
public void setOnItemClickListener(final accountheader.OnItemClickListener onItemClickListener) {
this.onItemClickListener = onItemClickListener;
}
#Override
public int getContentItemsTotal() {
return listobj.size();
}
#Override
public RecyclerView.ViewHolder getItemViewHolder(View view) {
return new ItemViewHolder(view);
}
#Override
public void onBindItemViewHolder(RecyclerView.ViewHolder holder, final int position) {
final ItemViewHolder viewHolder = (ItemViewHolder) holder;
TextView companyname=viewHolder.CompanyName;
TextView companygroup=viewHolder.CompanyGroup;
TextView acm=viewHolder.AccountManager;
TextView companytype=viewHolder.CompanyType;
ImageView caption=viewHolder.caption;
viewHolder.click.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Intent intent=new Intent(context, AccountView.class);
int name=listobj.get(position).getId();
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Log.d("n",String.valueOf(name));
context.startActivity(intent);
}
});
companyname.setText(listobj.get(position).getCompanyName());
companygroup.setText(listobj.get(position).getCompanyGroup());
acm.setText(listobj.get(position).getAccountManagerText());
ColorGenerator generator = ColorGenerator.DEFAULT;
TextDrawable drawable = TextDrawable.builder()
.buildRound((listobj.get(position).getCompanyName().substring(0,1)).toUpperCase(), generator.getRandomColor());
viewHolder.caption.setImageDrawable(drawable);
}
#Override
public RecyclerView.ViewHolder getHeaderViewHolder(View view) {
return new HeaderViewHolder(view);
}
#Override
public void onBindHeaderViewHolder(RecyclerView.ViewHolder holder) {
HeaderViewHolder headerHolder = (HeaderViewHolder) holder;
headerHolder.tvTitle.setText(title);
}
#Override
public void onClick(View v) {
final RecyclerView recyclerView = (RecyclerView) v.getParent();
int position = recyclerView.getChildLayoutPosition(v);
if (position != RecyclerView.NO_POSITION) {
this.onItemClickListener.onItemClicked(position);
}
}
public interface OnItemClickListener {
void onItemClicked(int position);
}
}
class HeaderViewHolder extends RecyclerView.ViewHolder {
final TextView tvTitle;
public HeaderViewHolder(View view) {
super(view);
tvTitle = (TextView) view.findViewById(R.id.tvTitle);
}
}
class ItemViewHolder extends RecyclerView.ViewHolder {
View click;
TextView CompanyName;
TextView CompanyGroup;
TextView AccountManager;
TextView CompanyType;
ImageView caption;
ItemViewHolder(View itemView) {
super(itemView);
click=itemView;
CompanyName=(TextView)itemView.findViewById(R.id.header);
CompanyGroup=(TextView)itemView.findViewById(R.id.middle);
AccountManager=(TextView)itemView.findViewById(R.id.footer);
CompanyType=(TextView)itemView.findViewById(R.id.status);
caption=(ImageView)itemView.findViewById(R.id.imageView);
}
}
This is how i implemented in activity:
SectionedRecyclerViewAdapter sectionAdapter = new SectionedRecyclerViewAdapter();
accountheader Accountheader=null;
for(char alphabet = 'A'; alphabet <= 'Z';alphabet++) {
List<AccountModel> contacts = getContactsWithLetter(alphabet,list);
Accountheader=new accountheader(String.valueOf(alphabet), contacts,getApplicationContext());
if (contacts.size() > 0) {
sectionAdapter.addSection(Accountheader);
}
}
recyclerView.setAdapter(sectionAdapter);
private List<AccountModel> getContactsWithLetter(char letter,List<AccountModel>list) {
List<AccountModel> contacts = new ArrayList<>();
for (AccountModel accountModel:list) {
if (accountModel.getCompanyGroup().charAt(0) == letter) {
contacts.add(accountModel);
}
}
return contacts;
}
How can i achieve this without any third party library can someone please guide me:

Related

Recyclerview onItemClick not working (no log)

I wanted to implement an OnItemClick on the elements of my RecyclerView and i built an interface on my adapter and I am calling it on my activity, however the click isn't working and there is no errors in the log, so I'm not sure what I'm messing up. It is a Grid Recyclerview, if that affects anything.. The toast doesn't show up either.
my adapter
public class ImagesAdapter extends RecyclerView.Adapter<ImagesAdapter.ImageViewHolder> {
private Context mContext;
private List<Images> mUploads;
private OnItemClickListener mListener;
public ImagesAdapter(Context context, List<Images> uploads) {
mContext = context;
mUploads = uploads;
}
#Override
public ImageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(mContext).inflate(R.layout.layout_view_post, parent, false);
return new ImageViewHolder(v);
}
#Override
public void onBindViewHolder(ImageViewHolder holder, int position) {
Picasso.get().load(mUploads.get(position).getImage_url2()).fit().centerCrop().into(holder.imageView);
}
#Override
public int getItemCount() {
return mUploads.size();
}
public class ImageViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
public ImageView imageView;
LinearLayout view_container;
public ImageViewHolder(View itemView) {
super(itemView);
imageView = itemView.findViewById(R.id.thumbnail2);
view_container = itemView.findViewById(R.id.container2);
}
#Override
public void onClick(View v) {
if (mListener != null) {
int position = getAdapterPosition();
if (position != RecyclerView.NO_POSITION) {
mListener.onItemClick(position);
}
}
}
}
public interface OnItemClickListener {
void onItemClick(int position);
}
public void setOnItemClickListener(OnItemClickListener listener) {
mListener = listener;
}
}
My activity
public class ProfileActivity2 extends AppCompatActivity implements OnMapReadyCallback, ImagesAdapter.OnItemClickListener {
mRecyclerview = findViewById(R.id.recyclerview_insideprofile);
mRecyclerview.setLayoutManager(new GridLayoutManager(this, 2));
mRecyclerview.setHasFixedSize(true);
mAdapter = new ImagesAdapter(ProfileActivity2.this, mImages);
mRecyclerview.setAdapter(mAdapter);
mStorage = FirebaseStorage.getInstance();
mDatabaseRef = FirebaseDatabase.getInstance().getReference("Building_Images");
mAdapter.setOnItemClickListener(ProfileActivity2.this);
#Override
public void onItemClick(int position) {
Toast.makeText(ProfileActivity2.this, "TestMessage", Toast.LENGTH_SHORT).show();
Images selectedItem = mImages.get(position);
final String image_url = selectedItem.getImage_url2();
Intent mainIntent = new Intent(ProfileActivity2.this, FullScreenImageActivity.class);
mainIntent.putExtra("b_image_url", image_url);
startActivity(mainIntent);
}
You forgot to add itemView.setOnClickListener in your viewholder, you have to add:
public ImageViewHolder(View itemView) {
super(itemView);
imageView = itemView.findViewById(R.id.layout);
itemView.setOnClickListener(this);

How to implement multiple callback in RecyclerAdapter?

I have custom ServerRecyclerAdapter in which I implemented onLongClickListener, but now I am having problem where to implement OnClickListener
public class ServerRecyclerAdapter extends RecyclerView.Adapter<ServerRecyclerAdapter.ViewHolder> {
//Interface for callbacks
interface ActionCallback {
void onLongClickListener(Server server);
}
private Context context;
private List<Server> serverList;
private ActionCallback mActionCallbacks;
ServerRecyclerAdapter(Context context, List<Server> serverList) {
this.context = context;
this.serverList = serverList;
}
#Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.item_recycler_server, parent, false);
return new ViewHolder(view);
}
#Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.bindData(position);
}
#Override
public int getItemCount() {
return serverList.size();
}
void updateData(List<Server> servers) {
this.serverList = servers;
notifyDataSetChanged();
}
//View Holder
class ViewHolder extends RecyclerView.ViewHolder implements View.OnLongClickListener {
private TextView mNameTextView;
ViewHolder(View itemView) {
super(itemView);
itemView.setOnLongClickListener(this);
mNameTextView = itemView.findViewById(R.id.nameTextView);
}
void bindData(int position) {
Server server = serverList.get(position);
String servername = server.getServerName();
mNameTextView.setText(servername);
}
#Override
public boolean onLongClick(View v) {
if (mActionCallbacks != null) {
mActionCallbacks.onLongClickListener(serverList.get(getAdapterPosition()));
}
return true;
}
}
void addActionCallback(ActionCallback actionCallbacks) {
mActionCallbacks = actionCallbacks;
}
Try this
ViewHolder(View itemView) {
super(itemView);
itemView.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
}
});
itemView.setOnLongClickListener(new View.OnLongClickListener() {
#Override
public boolean onLongClick(View view) {
if (mActionCallbacks != null) {
mActionCallbacks.onLongClickListener(serverList.get(getAdapterPosition()));
}
return true;
}
});
}
how about ...
extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener
then it will suggest you where to insert the override for that interface method.
For others how to solve this simple question :)
I've added in ActionCallback
void onClickListener(Server server);
and in ViewHolder
class ViewHolder extends RecyclerView.ViewHolder implements View.OnLongClickListener, View.OnClickListener {
private TextView mNameTextView;
ViewHolder(View itemView) {
super(itemView);
itemView.setOnLongClickListener(this);
itemView.setOnClickListener(this);
mNameTextView = itemView.findViewById(R.id.nameTextView);
}
.
.
.
#Override
public void onClick(View view) {
if (mActionCallbacks != null) {
mActionCallbacks.onClickListener(serverList.get(getAdapterPosition()));
}
}
Thx to #MikeM. for helping me solve it

error onclicklistener on recyclerview

i have a recyclerview and i want to when click on it receive the position and one String and sent to other activity and run it
i dont know where this code has problem.
Mainactivity
#Override
public void onItemClick(int i) {
datamodel clickedItem = postlist.get(i);
Intent detailIntent = new Intent(MainActivity.this, Main2Activity.class);
detailIntent.putExtra(EXTRA_URL, clickedItem.getmTitle());
startActivity(detailIntent);
}
Adapter codes:
public class rrecyclerviewadapter extends RecyclerView.Adapter<rrecyclerviewadapter.myholder> {
private OnItemClickListener mListener;
private Context context;
private List<datamodel>mylist;
public interface OnItemClickListener {
void onItemClick(int i);
}
public void setOnItemClickListener(OnItemClickListener listener) {
this.mListener = listener;
}
public rrecyclerviewadapter(Context context, List<datamodel>mylist){
this.context=context;
this.mylist=mylist;
}
#NonNull
#Override
public myholder onCreateViewHolder(#NonNull ViewGroup viewGroup, int i) {
View view= LayoutInflater.from(context).inflate(R.layout.each_item,viewGroup,false);
return new myholder(view);
}
#Override
public void onBindViewHolder(#NonNull myholder myholder, int i) {
datamodel datamodel=mylist.get(i);
myholder.eachitemtxt.setText(datamodel.getmTitle());
Picasso.with(context).load(datamodel.getMimageurl()).placeholder(R.drawable.pic3).error(R.drawable.pic4).into(myholder.eachitemimg);
}
#Override
public int getItemCount() {
return mylist.size();
}
public class myholder extends RecyclerView.ViewHolder {
private TextView eachitemtxt;
private ImageView eachitemimg;
public myholder(#NonNull final View itemView) {
super(itemView);
eachitemimg = (ImageView) itemView.findViewById(R.id.imageview_eachitem);
eachitemtxt = (TextView) itemView.findViewById(R.id.textview_eachitem);
itemView.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
Toast.makeText(context, "id:" + getAdapterPosition(),
Toast.LENGTH_SHORT).show();
int i=getAdapterPosition();
if (i != RecyclerView.NO_POSITION) {
mListener.onItemClick(i);
}}
});}}}
here there is full adapter code
on other activity i get intent.
in the adapter when testing Toast its completely works but on the mlistener and
setting id it does not work
found it.
just need to add
Adapter.setOnItemClickListener(Activitymain.this)
to your Mainactivity
i just changed your holder class in adapter try the below code
public class myholder extends RecyclerView.ViewHolder implements View.OnClickListener {
private TextView eachitemtxt;
private ImageView eachitemimg;
public myholder(#NonNull final View itemView) {
super(itemView);
eachitemimg = (ImageView) itemView.findViewById(R.id.imageview_eachitem);
eachitemtxt = (TextView) itemView.findViewById(R.id.textview_eachitem);
itemView.setOnClickListener(this);
}
#Override
public void onClick(View v) {
int p = getAdapterPosition();
datamodel clickedItem = postlist.get(p);
Intent detailIntent = new Intent(context, Main2Activity.class);
detailIntent.putExtra(EXTRA_URL, clickedItem.getmTitle());
context.startActivity(detailIntent);
}
}

How to to set onClick in the RecyclerView?

I have created a RecyclerView Adapter but now i'm struggling to do the onClick to open new activity.
This is my RecyclerView Adapter class:
public class RecycleAdapter extends RecyclerView.Adapter<RecycleAdapter.ViewHolder> {
private ArrayList<HashMap<String, String>> mDataset;
Context ctx;
public RecycleAdapter(ArrayList<HashMap<String, String>> mDataset) {
this.mDataset = mDataset;
this.ctx = ctx;
}
#Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.activity_procedure, parent, false);
return new ViewHolder(v);
}
#Override
public void onBindViewHolder(ViewHolder holder, int position) {
holder.getId().setText(mDataset.get(position).get("id"));
holder.getItemname().setText(mDataset.get(position).get("name"));
//holder.getIvImage().setBackground(mDataset.get(position).get("icon"));
}
#Override
public int getItemCount() {
return mDataset.size();
}
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private CardView cardView;
private TextView itemId;
private TextView tvName;
private ImageView ivImage;
public ViewHolder(View itemView) {
super(itemView);
itemView.setOnClickListener(this);
itemId = itemView.findViewById(R.id.tvProfileItemName);
tvName = itemView.findViewById(R.id.tvProfileItemAge);
ivImage = itemView.findViewById(R.id.imageView3);
}
public TextView getId() {
return itemId;
}
public TextView getItemname() {
return tvName;
}
public ImageView getIvImage() {
return ivImage;
}
#Override
public void onClick(View v) {
}
}
}
My Main Activity just display the data inside of a recycler view
#Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
ListAdapter adapter = new SimpleAdapter(MainActivity.this, contactList,
R.layout.list_item, new String[]{"id", "name", "icon"},
new int[]{R.id.id, R.id.name, R.id.icon});
mAdapter = new RecycleAdapter(contactList);
mRecyclerView.setAdapter(mAdapter);
}
use interface
in recycler view adapter class
public interface recClick{
void onClickRec(int p);
}
private recClick rc;
public void setRecClick(recClick rc){
this.rc = rc
}
in recycler view holder class
#Override
public void onClick(View v) {
rc.onClickRec(getAdapterPosition());
}
in MainActivity use Interface
class MainActivity implements AdapterClass.recClick{
mAdapter.setRecClick(this);
#Override
public onClickRec(int p)
{
// do someting
}
}
#Override
public void onBindViewHolder(ViewHolder holder, int position) {
final int pos =position;
holder.getId().setText(mDataset.get(position).get("id"));
holder.getItemname().setText(mDataset.get(position).get("name"));
//holder.getIvImage().setBackground(mDataset.get(position).get("icon"));
holder.cardView.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Intent intent=new Intent(context,NewActivity.class);
intent.putExtra("yourValue", String.valueOf(mDataset.get(position).get(pos)));
ctx.startActivity(intent);
}
});
}
Remember to give reference to your cardview
cardView = (CardView)itemView.findViewById(R.id.cardview);

Put RecyclerView in front of Image

I am building an App that uses RecyclerView and CardView. Since RecyclerView doesn’t have an onItemClickListener method I found one class implementation that does this and was able to insert this class in my project.
In each card I am putting one imageView (I am using Glide to load images) and a couple of TextViews. When the TextView was below the image I was able to use the onItemClickListener Perfectly, but I decided to put the text in front of the image inside a RelativeLayout with a black transparent background.
The problem is that after this change the onItemClickListener stopped working. The images occupy the whole cardView and the TextView is in front of it. By clicking on any of these elements the method doesn’t work. I think that I need to bring the recyclerView to the front of the activity but I don’t know how to do that. I tried to use recyclerView.bringToFront() but it didn’t work.
This is the card before (the click listener was working when clicking on the white area):
And this is the card now (the click listener doesn't work when I click anywhere):
This is my ItemClickSupport class:
public class ItemClickSupport {
private final RecyclerView mRecyclerView;
private OnItemClickListener mOnItemClickListener;
private OnItemLongClickListener mOnItemLongClickListener;
private View.OnClickListener mOnClickListener = new View.OnClickListener() {
#Override
public void onClick(View v) {
if (mOnItemClickListener != null) {
RecyclerView.ViewHolder holder = mRecyclerView.getChildViewHolder(v);
mOnItemClickListener.onItemClicked(mRecyclerView, holder.getAdapterPosition(), v);
}
}
};
private View.OnLongClickListener mOnLongClickListener = new View.OnLongClickListener() {
#Override
public boolean onLongClick(View v) {
if (mOnItemLongClickListener != null) {
RecyclerView.ViewHolder holder = mRecyclerView.getChildViewHolder(v);
return mOnItemLongClickListener.onItemLongClicked(mRecyclerView, holder.getAdapterPosition(), v);
}
return false;
}
};
private RecyclerView.OnChildAttachStateChangeListener mAttachListener
= new RecyclerView.OnChildAttachStateChangeListener() {
#Override
public void onChildViewAttachedToWindow(View view) {
if (mOnItemClickListener != null) {
view.setOnClickListener(mOnClickListener);
}
if (mOnItemLongClickListener != null) {
view.setOnLongClickListener(mOnLongClickListener);
}
}
#Override
public void onChildViewDetachedFromWindow(View view) {
}
};
private ItemClickSupport(RecyclerView recyclerView) {
mRecyclerView = recyclerView;
mRecyclerView.setTag(R.id.item_click_support, this);
mRecyclerView.addOnChildAttachStateChangeListener(mAttachListener);
}
public static ItemClickSupport addTo(RecyclerView view) {
ItemClickSupport support = (ItemClickSupport) view.getTag(R.id.item_click_support);
if (support == null) {
support = new ItemClickSupport(view);
}
return support;
}
public static ItemClickSupport removeFrom(RecyclerView view) {
ItemClickSupport support = (ItemClickSupport) view.getTag(R.id.item_click_support);
if (support != null) {
support.detach(view);
}
return support;
}
public ItemClickSupport setOnItemClickListener(OnItemClickListener listener) {
mOnItemClickListener = listener;
return this;
}
public ItemClickSupport setOnItemLongClickListener(OnItemLongClickListener listener) {
mOnItemLongClickListener = listener;
return this;
}
private void detach(RecyclerView view) {
view.removeOnChildAttachStateChangeListener(mAttachListener);
view.setTag(R.id.item_click_support, null);
}
public interface OnItemClickListener {
void onItemClicked(RecyclerView recyclerView, int position, View v);
}
public interface OnItemLongClickListener {
boolean onItemLongClicked(RecyclerView recyclerView, int position, View v);
}
}
And this is me calling it from my Activity:
ItemClickSupport.addTo(recyclerView).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
#Override
public void onItemClicked(RecyclerView recyclerView, int position, View v) {
Intent intent = new Intent(getBaseContext(), MovieDetails.class);
intent.putExtra("movie_name", movies.get(position).getTitle());
intent.putExtra("movie_rating", movies.get(position).getVoteAverage().toString());
intent.putExtra("movie_description", movies.get(position).getOverview());
intent.putExtra("movie_cover", movies.get(position).getPosterPath());
intent.putExtra("movie_date", movies.get(position).getReleaseDate());
intent.putExtra("movie_language", movies.get(position).getOriginalLanguage());
intent.putExtra("movie_backdrop", movies.get(position).getBackdropPath());
//intent.putExtra("album_name", albumList.get(position).getName());
//intent.putExtra("album_thumbnail", Integer.toString(albumList.get(position).getThumbnail()));
//intent.putExtra("number_songs", Integer.toString(albumList.get(position).getNumOfSongs()));
startActivity(intent);
}
});
This is my Adapter:
public class MoviesAdapter extends RecyclerView.Adapter<MoviesAdapter.MyViewHolder> {
private Context mContext;
private List<MovieItem> movieList;
public class MyViewHolder extends RecyclerView.ViewHolder {
public TextView title, count;
public ImageView thumbnail, overflow, star1, star2, star3, star4, star5;
public MyViewHolder(View view) {
super(view);
title = (TextView) view.findViewById(R.id.title);
count = (TextView) view.findViewById(R.id.count);
thumbnail = (ImageView) view.findViewById(R.id.thumbnail);
star1 = (ImageView) view.findViewById(R.id.rating_image1);
star2 = (ImageView) view.findViewById(R.id.rating_image2);
star3 = (ImageView) view.findViewById(R.id.rating_image3);
star4 = (ImageView) view.findViewById(R.id.rating_image4);
star5 = (ImageView) view.findViewById(R.id.rating_image5);
//overflow = (ImageView) view.findViewById(R.id.overflow);
}
}
public MoviesAdapter(Context mContext, List<MovieItem> movieList) {
this.mContext = mContext;
this.movieList = movieList;
}
#Override
public MoviesAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.album_card, parent, false);
return new MyViewHolder(itemView);
}
#Override
public void onBindViewHolder(final MoviesAdapter.MyViewHolder holder, int position) {
MovieItem movie = movieList.get(position);
holder.title.setText(movie.getTitle());
holder.count.setText("R: " + movie.getVoteAverage().toString() + "/10");
Glide.with(mContext).load("https://image.tmdb.org/t/p/w500" + movie.getPosterPath()).into(holder.thumbnail);
}
#Override
public int getItemCount() {
return movieList.size();
}
}
I managed to solve my problem by doing what Sahil suggested me to. I put the onClickListener on the image instead of the recycler view. To do that I had to put the code inside my Adapter in the onBindViewHolder method (I didn't know I could do that).
It was something like this:
(I had to declare the variable int position as final in order to access it in the onClickListener and to set the flag Intent.FLAG_ACTIVITY_NEW_TASK because I was starting another Activity from outside an Activity.
#Override
public void onBindViewHolder(final MyViewHolder holder, final int position) {
holder.thumbnail.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
Intent intent = new Intent(mContext, MovieDetails.class);
intent.putExtra("movie_name", movieList.get(position).getTitle());
intent.putExtra("movie_rating", movieList.get(position).getVoteAverage().toString());
intent.putExtra("movie_description", movieList.get(position).getOverview());
intent.putExtra("movie_cover", movieList.get(position).getPosterPath());
intent.putExtra("movie_date", movieList.get(position).getReleaseDate());
intent.putExtra("movie_language", movieList.get(position).getOriginalLanguage());
intent.putExtra("movie_backdrop", movieList.get(position).getBackdropPath());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//intent.putExtra("album_name", albumList.get(position).getName());
//intent.putExtra("album_thumbnail", Integer.toString(albumList.get(position).getThumbnail()));
//intent.putExtra("number_songs", Integer.toString(albumList.get(position).getNumOfSongs()));
mContext.startActivity(intent);
}
});
}

Categories

Resources