I am a beginner in android. I am creating an application where data will be shown through recyclerview, but I want that only some items should display in recyclerview.
However when the user clicks the "View All" button then only whole items should display. Can anyone tell me how can I do this?
viewtext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getContext(), AppviewActivity.class);
intent.putExtra("mylist","newmodel");
getContext().startActivity(intent);
}
});
DetailsActivity.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_appview);
ArrayList<String> mylist = (ArrayList<String>) getIntent().getSerializableExtra("mylist");
}
NewModel class
public class NewModel {
Drawable sociallogo;
String socailtext;
String href;
public NewModel(Drawable sociallogo, String socailtext, String href){
this.sociallogo = sociallogo;
this.socailtext= socailtext;
this.href = href;
}
public Drawable getSociallogo(){
return sociallogo;
}
public String getSocailtext(){
return socailtext;
}
public String getHref(){
return href;
}
}