Android Open Source - android-recyclerview-sample Item






From Project

Back to project page android-recyclerview-sample.

License

The source code is released under:

Apache License

If you think the Android project android-recyclerview-sample listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kupferwerk.sample.recyclerview.model;
// w  w w  . j a  v  a  2 s.  co  m
import java.util.LinkedList;
import java.util.List;

public class Item {

   private String title;
   private String subTitle;

   public static List<Item> buildDemoModel(int count) {
      List<Item> items = new LinkedList<Item>();
      for (int i = 0; i < count; i++) {
         String title = "Title of Item " + i;
         String subtitle = "subTitle of Item " + i;
         items.add(new Item().setTitle(title).setSubTitle(subtitle));
      }
      return items;
   }

   public String getSubTitle() {
      return subTitle;
   }

   public Item setSubTitle(String subTitle) {
      this.subTitle = subTitle;
      return this;
   }

   public String getTitle() {
      return title;
   }

   public Item setTitle(String title) {
      this.title = title;
      return this;
   }
}




Java Source Code List

com.kupferwerk.sample.recyclerview.ApplicationTest.java
com.kupferwerk.sample.recyclerview.MainActivity.java
com.kupferwerk.sample.recyclerview.adapter.SimpleAdapter.java
com.kupferwerk.sample.recyclerview.adapter.StaggeredAdapter.java
com.kupferwerk.sample.recyclerview.gridlayout.GridLayoutActivity.java
com.kupferwerk.sample.recyclerview.linearlayout.LinearLayoutActivity.java
com.kupferwerk.sample.recyclerview.model.Item.java
com.kupferwerk.sample.recyclerview.staggeredgridlayout.StaggeredGridLayoutActivity.java