Skip to content

Instantly share code, notes, and snippets.

@nixwins
Created November 15, 2016 07:28
Show Gist options
  • Save nixwins/754a8cba33998ffba64766f5adc22ba2 to your computer and use it in GitHub Desktop.
Save nixwins/754a8cba33998ffba64766f5adc22ba2 to your computer and use it in GitHub Desktop.
Это модель
package org.vkadmin.vkadmin;
import java.util.ArrayList;
import java.util.List;
/**
* Created by nixwins on 11/15/16.
*/
public class ModelItem {
private String author;
private int imgId;
public ModelItem(String author, int imgId){
this.author=author;
this.imgId = imgId;
}
public int getImgId(){
return imgId;
}
public String getAuthor(){
return author;
}
public static List<ModelItem> getFakeItems(){
ArrayList<ModelItem> itemsList = new ArrayList<>();
itemsList.add(new ModelItem("Dos", R.drawable.img_2));
itemsList.add(new ModelItem("Arman", R.drawable.img_3));
itemsList.add(new ModelItem("Marat", R.drawable.img_2));
itemsList.add(new ModelItem("Google", R.drawable.img_3));
return itemsList;
}
@Override
public String toString() {
return "Author: " + author + " ImageID: " + imgId;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment