1 |
|
package com.loopback.androidapps.saveapp; |
2 |
|
|
3 |
|
import java.util.ArrayList; |
4 |
|
|
5 |
|
import android.content.Context; |
6 |
|
import android.view.View; |
7 |
|
import android.view.ViewGroup; |
8 |
|
import android.widget.BaseAdapter; |
9 |
|
|
|
|
| 84,6% |
Uncovered Elements: 2 (13) |
Complexity: 5 |
Complexity Density: 0,62 |
|
10 |
|
public class OutlayAdapter extends BaseAdapter { |
11 |
|
public Context context; |
12 |
|
public ArrayList<Outlay> items; |
13 |
|
public boolean landscape; |
14 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0,33 |
|
15 |
9
|
public OutlayAdapter(Context _context, ArrayList<Outlay> list, boolean _landscape) {... |
16 |
9
|
this.context = _context; |
17 |
9
|
items = list; |
18 |
9
|
landscape = _landscape; |
19 |
|
} |
20 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
21 |
100
|
public int getCount() {... |
22 |
100
|
return items.size(); |
23 |
|
} |
24 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
25 |
0
|
public Object getItem(int position) {... |
26 |
0
|
return items.get(position); |
27 |
|
} |
28 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
29 |
10
|
public long getItemId(int position) {... |
30 |
10
|
return position; |
31 |
|
} |
32 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
33 |
42
|
public View getView(int position, View convertView, ViewGroup parent) {... |
34 |
42
|
Outlay outlay = items.get(position); |
35 |
42
|
return new OutlayListItem(context, outlay, position + 1, landscape); |
36 |
|
} |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
} |