I have a recyclerview like this:
item 10
admob (item 9 has gone)
item 8
item 7
item 6 ...
I'm adding admob in position 2. It is what I want.
The problem is to parse the data. I want to jump the position 2 when parse the data, like so:
item 10
admob
item 9 <-- now I have item 9
item 8
item 7
item 6 ...
my parse data:
//This method will parse json data
private void parseData(JSONArray array) {
for (int i = 0; i < array.length(); i++) {
//Creating the object
Posts PostObj = new Posts();
JSONObject json;
try {
//Getting json
json = array.getJSONObject(i);
//Adding data to the object
PostObj.setImageUrl(json.getString(Config.TAG_IMAGE_URL));
PostObj.setName(json.getString(Config.TAG_NAME));
...
Any ideas how to jump parsing in position 2 that is for my admob?
I tried to add if(i == 2) { return; }
but all itens disappear...