Created
November 15, 2016 07:28
-
-
Save nixwins/754a8cba33998ffba64766f5adc22ba2 to your computer and use it in GitHub Desktop.
Это модель
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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