first commit
[bylock.git] / sources / android / support / v7 / internal / view / menu / p.java
blob1b2baa67f3d3e6178ee8469372de1b31902c4903
1 package android.support.v7.internal.view.menu;
3 import android.view.View;
4 import android.view.ViewGroup;
5 import android.widget.BaseAdapter;
6 import java.util.ArrayList;
8 /* access modifiers changed from: package-private */
9 /* compiled from: MyApp */
10 public class p extends BaseAdapter {
11 final /* synthetic */ o a;
12 private int b = -1;
14 public p(o oVar) {
15 this.a = oVar;
16 a();
19 public int getCount() {
20 int size = this.a.c.l().size() - this.a.h;
21 return this.b < 0 ? size : size - 1;
24 /* renamed from: a */
25 public u getItem(int i) {
26 ArrayList l = this.a.c.l();
27 int i2 = this.a.h + i;
28 if (this.b >= 0 && i2 >= this.b) {
29 i2++;
31 return (u) l.get(i2);
34 public long getItemId(int i) {
35 return (long) i;
38 public View getView(int i, View view, ViewGroup viewGroup) {
39 View view2;
40 if (view == null) {
41 view2 = this.a.b.inflate(this.a.f, viewGroup, false);
42 } else {
43 view2 = view;
45 ((ai) view2).a(getItem(i), 0);
46 return view2;
49 /* access modifiers changed from: package-private */
50 public void a() {
51 u r = this.a.c.r();
52 if (r != null) {
53 ArrayList l = this.a.c.l();
54 int size = l.size();
55 for (int i = 0; i < size; i++) {
56 if (((u) l.get(i)) == r) {
57 this.b = i;
58 return;
62 this.b = -1;
65 public void notifyDataSetChanged() {
66 a();
67 super.notifyDataSetChanged();