package gunav2.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class preoptimizedclv extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "gunav2.keymon.com.mx.preoptimizedclv");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.keymon.com.mx.preoptimizedclv.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public b4a.example3.customlistview _mclv = null;
public anywheresoftware.b4a.objects.collections.List _items = null;
public anywheresoftware.b4a.objects.collections.List _panelscache = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _stubpanel = null;
public boolean _horizontal = false;
public gunav2.keymon.com.mx.b4xset[] _assigneditems = null;
public int _assigneditemsasindex = 0;
public anywheresoftware.b4j.object.JavaObject _jclv = null;
public int _extraitems = 0;
public anywheresoftware.b4a.objects.collections.List _listofitemsthatshouldbeupdated = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public boolean _showscrollbar = false;
public gunav2.keymon.com.mx.b4xseekbar _b4xseekbar1 = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _pnloverlay = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _lblhint = null;
public int _lastuserchangeindex = 0;
public int _numberofsteps = 0;
public int _delaybeforehidingoverlay = 0;
public Object _mcallback = null;
public String _meventname = "";
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public String  _initialize(gunav2.keymon.com.mx.preoptimizedclv __ref,anywheresoftware.b4a.BA _ba,Object _callback,String _eventname,b4a.example3.customlistview _clv) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "initialize", true))
	 {return ((String) Debug.delegate(ba, "initialize", new Object[] {_ba,_callback,_eventname,_clv}));}
RDebugUtils.currentLine=20643840;
 //BA.debugLineNum = 20643840;BA.debugLine="Public Sub Initialize (Callback As Object, EventNa";
RDebugUtils.currentLine=20643841;
 //BA.debugLineNum = 20643841;BA.debugLine="mCLV = CLV";
__ref._mclv /*b4a.example3.customlistview*/  = _clv;
RDebugUtils.currentLine=20643842;
 //BA.debugLineNum = 20643842;BA.debugLine="jclv = mCLV 'ignore";
__ref._jclv /*anywheresoftware.b4j.object.JavaObject*/  = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(__ref._mclv /*b4a.example3.customlistview*/ ));
RDebugUtils.currentLine=20643847;
 //BA.debugLineNum = 20643847;BA.debugLine="items = jclv.GetFieldJO(\"_items\").RunMethod(\"getO";
__ref._items /*anywheresoftware.b4a.objects.collections.List*/  = (anywheresoftware.b4a.objects.collections.List) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.List(), (java.util.List)(__ref._jclv /*anywheresoftware.b4j.object.JavaObject*/ .GetFieldJO("_items").RunMethod("getObject",(Object[])(__c.Null))));
RDebugUtils.currentLine=20643848;
 //BA.debugLineNum = 20643848;BA.debugLine="horizontal = jclv.GetField(\"_horizontal\")";
__ref._horizontal /*boolean*/  = BA.ObjectToBoolean(__ref._jclv /*anywheresoftware.b4j.object.JavaObject*/ .GetField("_horizontal"));
RDebugUtils.currentLine=20643850;
 //BA.debugLineNum = 20643850;BA.debugLine="PanelsCache.Initialize";
__ref._panelscache /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=20643851;
 //BA.debugLineNum = 20643851;BA.debugLine="StubPanel = CreatePanel";
__ref._stubpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = __ref._createpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/ (null);
RDebugUtils.currentLine=20643852;
 //BA.debugLineNum = 20643852;BA.debugLine="StubPanel.AddView(xui.CreatePanel(\"\"), 0, 0, 10di";
__ref._stubpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .AddView((android.view.View)(__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .CreatePanel(ba,"").getObject()),(int) (0),(int) (0),__c.DipToCurrent((int) (10)),__c.DipToCurrent((int) (10)));
RDebugUtils.currentLine=20643853;
 //BA.debugLineNum = 20643853;BA.debugLine="AssignedItems = Array As B4XSet(B4XCollections.Cr";
__ref._assigneditems /*gunav2.keymon.com.mx.b4xset[]*/  = new gunav2.keymon.com.mx.b4xset[]{_b4xcollections._createset /*gunav2.keymon.com.mx.b4xset*/ (ba),_b4xcollections._createset /*gunav2.keymon.com.mx.b4xset*/ (ba)};
RDebugUtils.currentLine=20643854;
 //BA.debugLineNum = 20643854;BA.debugLine="ListOfItemsThatShouldBeUpdated.Initialize";
__ref._listofitemsthatshouldbeupdated /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=20643855;
 //BA.debugLineNum = 20643855;BA.debugLine="mCLV.AsView.LoadLayout(\"PCLVSeekBar\")";
__ref._mclv /*b4a.example3.customlistview*/ ._asview().LoadLayout("PCLVSeekBar",ba);
RDebugUtils.currentLine=20643856;
 //BA.debugLineNum = 20643856;BA.debugLine="B4XSeekBar1.Size1 = 1dip";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._size1 /*int*/  = __c.DipToCurrent((int) (1));
RDebugUtils.currentLine=20643857;
 //BA.debugLineNum = 20643857;BA.debugLine="B4XSeekBar1.Size2 = 1dip";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._size2 /*int*/  = __c.DipToCurrent((int) (1));
RDebugUtils.currentLine=20643858;
 //BA.debugLineNum = 20643858;BA.debugLine="B4XSeekBar1.Radius1 = 8dip";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._radius1 /*int*/  = __c.DipToCurrent((int) (8));
RDebugUtils.currentLine=20643859;
 //BA.debugLineNum = 20643859;BA.debugLine="B4XSeekBar1.Update";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._update /*String*/ (null);
RDebugUtils.currentLine=20643860;
 //BA.debugLineNum = 20643860;BA.debugLine="mCallback = Callback";
__ref._mcallback /*Object*/  = _callback;
RDebugUtils.currentLine=20643861;
 //BA.debugLineNum = 20643861;BA.debugLine="mEventName = EventName";
__ref._meventname /*String*/  = _eventname;
RDebugUtils.currentLine=20643862;
 //BA.debugLineNum = 20643862;BA.debugLine="End Sub";
return "";
}
public String  _commit(gunav2.keymon.com.mx.preoptimizedclv __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "commit", true))
	 {return ((String) Debug.delegate(ba, "commit", null));}
int _dividersize = 0;
int _totalsize = 0;
int _i = 0;
b4a.example3.customlistview._clvitem _it = null;
RDebugUtils.currentLine=20774912;
 //BA.debugLineNum = 20774912;BA.debugLine="Public Sub Commit";
RDebugUtils.currentLine=20774913;
 //BA.debugLineNum = 20774913;BA.debugLine="ClearAssignedItems";
__ref._clearassigneditems /*String*/ (null);
RDebugUtils.currentLine=20774914;
 //BA.debugLineNum = 20774914;BA.debugLine="Dim DividerSize As Int = mCLV.DividerSize";
_dividersize = (int) (__ref._mclv /*b4a.example3.customlistview*/ ._getdividersize());
RDebugUtils.currentLine=20774915;
 //BA.debugLineNum = 20774915;BA.debugLine="Dim TotalSize As Int = DividerSize";
_totalsize = _dividersize;
RDebugUtils.currentLine=20774916;
 //BA.debugLineNum = 20774916;BA.debugLine="For i = 0 To items.Size - 1";
{
final int step4 = 1;
final int limit4 = (int) (__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .getSize()-1);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
RDebugUtils.currentLine=20774917;
 //BA.debugLineNum = 20774917;BA.debugLine="Dim it As CLVItem = items.Get(i)";
_it = (b4a.example3.customlistview._clvitem)(__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .Get(_i));
RDebugUtils.currentLine=20774918;
 //BA.debugLineNum = 20774918;BA.debugLine="it.Offset = TotalSize";
_it.Offset = _totalsize;
RDebugUtils.currentLine=20774919;
 //BA.debugLineNum = 20774919;BA.debugLine="TotalSize = TotalSize + it.Size + DividerSize";
_totalsize = (int) (_totalsize+_it.Size+_dividersize);
 }
};
RDebugUtils.currentLine=20774921;
 //BA.debugLineNum = 20774921;BA.debugLine="If horizontal Then";
if (__ref._horizontal /*boolean*/ ) { 
RDebugUtils.currentLine=20774922;
 //BA.debugLineNum = 20774922;BA.debugLine="mCLV.sv.ScrollViewContentWidth = TotalSize";
__ref._mclv /*b4a.example3.customlistview*/ ._sv.setScrollViewContentWidth(_totalsize);
 }else {
RDebugUtils.currentLine=20774924;
 //BA.debugLineNum = 20774924;BA.debugLine="mCLV.sv.ScrollViewContentHeight = TotalSize";
__ref._mclv /*b4a.example3.customlistview*/ ._sv.setScrollViewContentHeight(_totalsize);
 };
RDebugUtils.currentLine=20774926;
 //BA.debugLineNum = 20774926;BA.debugLine="B4XSeekBar1.mBase.Visible = ShowScrollBar";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._mbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setVisible(__ref._showscrollbar /*boolean*/ );
RDebugUtils.currentLine=20774927;
 //BA.debugLineNum = 20774927;BA.debugLine="If ShowScrollBar Then";
if (__ref._showscrollbar /*boolean*/ ) { 
RDebugUtils.currentLine=20774928;
 //BA.debugLineNum = 20774928;BA.debugLine="B4XSeekBar1.MaxValue = items.Size";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._maxvalue /*int*/  = __ref._items /*anywheresoftware.b4a.objects.collections.List*/ .getSize();
RDebugUtils.currentLine=20774929;
 //BA.debugLineNum = 20774929;BA.debugLine="B4XSeekBar1.Interval = items.Size / NumberOfStep";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._interval /*int*/  = (int) (__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .getSize()/(double)__ref._numberofsteps /*int*/ );
 };
RDebugUtils.currentLine=20774931;
 //BA.debugLineNum = 20774931;BA.debugLine="RaiseVisibleRangeEvent";
__ref._raisevisiblerangeevent /*String*/ (null);
RDebugUtils.currentLine=20774933;
 //BA.debugLineNum = 20774933;BA.debugLine="End Sub";
return "";
}
public String  _additem(gunav2.keymon.com.mx.preoptimizedclv __ref,int _size,int _clr,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "additem", true))
	 {return ((String) Debug.delegate(ba, "additem", new Object[] {_size,_clr,_value}));}
b4a.example3.customlistview._clvitem _newitem = null;
RDebugUtils.currentLine=20709376;
 //BA.debugLineNum = 20709376;BA.debugLine="Public Sub AddItem (Size As Int, Clr As Int, Value";
RDebugUtils.currentLine=20709377;
 //BA.debugLineNum = 20709377;BA.debugLine="Dim NewItem As CLVItem";
_newitem = new b4a.example3.customlistview._clvitem();
RDebugUtils.currentLine=20709378;
 //BA.debugLineNum = 20709378;BA.debugLine="NewItem.Color = Clr";
_newitem.Color = _clr;
RDebugUtils.currentLine=20709379;
 //BA.debugLineNum = 20709379;BA.debugLine="NewItem.Panel = StubPanel";
_newitem.Panel = __ref._stubpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/ ;
RDebugUtils.currentLine=20709380;
 //BA.debugLineNum = 20709380;BA.debugLine="NewItem.Value = Value";
_newitem.Value = _value;
RDebugUtils.currentLine=20709381;
 //BA.debugLineNum = 20709381;BA.debugLine="NewItem.Size = Size";
_newitem.Size = _size;
RDebugUtils.currentLine=20709382;
 //BA.debugLineNum = 20709382;BA.debugLine="items.Add(NewItem)";
__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_newitem));
RDebugUtils.currentLine=20709383;
 //BA.debugLineNum = 20709383;BA.debugLine="End Sub";
return "";
}
public void  _b4xseekbar1_touchstatechanged(gunav2.keymon.com.mx.preoptimizedclv __ref,boolean _pressed) throws Exception{
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "b4xseekbar1_touchstatechanged", true))
	 {Debug.delegate(ba, "b4xseekbar1_touchstatechanged", new Object[] {_pressed}); return;}
ResumableSub_B4XSeekBar1_TouchStateChanged rsub = new ResumableSub_B4XSeekBar1_TouchStateChanged(this,__ref,_pressed);
rsub.resume(ba, null);
}
public static class ResumableSub_B4XSeekBar1_TouchStateChanged extends BA.ResumableSub {
public ResumableSub_B4XSeekBar1_TouchStateChanged(gunav2.keymon.com.mx.preoptimizedclv parent,gunav2.keymon.com.mx.preoptimizedclv __ref,boolean _pressed) {
this.parent = parent;
this.__ref = __ref;
this._pressed = _pressed;
this.__ref = parent;
}
gunav2.keymon.com.mx.preoptimizedclv __ref;
gunav2.keymon.com.mx.preoptimizedclv parent;
boolean _pressed;
anywheresoftware.b4j.object.JavaObject _jo = null;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="preoptimizedclv";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=21299201;
 //BA.debugLineNum = 21299201;BA.debugLine="If Pressed = False Then";
if (true) break;

case 1:
//if
this.state = 6;
if (_pressed==parent.__c.False) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 6;
RDebugUtils.currentLine=21299202;
 //BA.debugLineNum = 21299202;BA.debugLine="mCLV.JumpToItem(LastUserChangeIndex)";
__ref._mclv /*b4a.example3.customlistview*/ ._jumptoitem(__ref._lastuserchangeindex /*int*/ );
RDebugUtils.currentLine=21299203;
 //BA.debugLineNum = 21299203;BA.debugLine="Sleep(DelayBeforeHidingOverlay)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "preoptimizedclv", "b4xseekbar1_touchstatechanged"),__ref._delaybeforehidingoverlay /*int*/ );
this.state = 7;
return;
case 7:
//C
this.state = 6;
;
RDebugUtils.currentLine=21299204;
 //BA.debugLineNum = 21299204;BA.debugLine="pnlOverlay.Visible = False";
__ref._pnloverlay /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setVisible(parent.__c.False);
 if (true) break;

case 5:
//C
this.state = 6;
RDebugUtils.currentLine=21299206;
 //BA.debugLineNum = 21299206;BA.debugLine="pnlOverlay.Visible = True";
__ref._pnloverlay /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setVisible(parent.__c.True);
RDebugUtils.currentLine=21299208;
 //BA.debugLineNum = 21299208;BA.debugLine="Dim jo As JavaObject = mCLV.sv";
_jo = new anywheresoftware.b4j.object.JavaObject();
_jo = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(__ref._mclv /*b4a.example3.customlistview*/ ._sv.getObject()));
RDebugUtils.currentLine=21299209;
 //BA.debugLineNum = 21299209;BA.debugLine="jo.RunMethod(\"fling\", Array(0))";
_jo.RunMethod("fling",new Object[]{(Object)(0)});
 if (true) break;

case 6:
//C
this.state = -1;
;
RDebugUtils.currentLine=21299212;
 //BA.debugLineNum = 21299212;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xseekbar1_valuechanged(gunav2.keymon.com.mx.preoptimizedclv __ref,int _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "b4xseekbar1_valuechanged", true))
	 {return ((String) Debug.delegate(ba, "b4xseekbar1_valuechanged", new Object[] {_value}));}
Object _t = null;
RDebugUtils.currentLine=21364736;
 //BA.debugLineNum = 21364736;BA.debugLine="Sub B4XSeekBar1_ValueChanged (Value As Int)";
RDebugUtils.currentLine=21364737;
 //BA.debugLineNum = 21364737;BA.debugLine="LastUserChangeIndex = Max(0, items.Size - 1 - Val";
__ref._lastuserchangeindex /*int*/  = (int) (__c.Max(0,__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .getSize()-1-_value));
RDebugUtils.currentLine=21364738;
 //BA.debugLineNum = 21364738;BA.debugLine="If LastUserChangeIndex < B4XSeekBar1.Interval The";
if (__ref._lastuserchangeindex /*int*/ <__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._interval /*int*/ ) { 
__ref._lastuserchangeindex /*int*/  = (int) (0);};
RDebugUtils.currentLine=21364739;
 //BA.debugLineNum = 21364739;BA.debugLine="lblHint.Text = \"\"";
__ref._lblhint /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=21364740;
 //BA.debugLineNum = 21364740;BA.debugLine="If xui.SubExists(mCallback, mEventName & \"_HintRe";
if (__ref._xui /*anywheresoftware.b4a.objects.B4XViewWrapper.XUI*/ .SubExists(ba,__ref._mcallback /*Object*/ ,__ref._meventname /*String*/ +"_HintRequested",(int) (1))) { 
RDebugUtils.currentLine=21364741;
 //BA.debugLineNum = 21364741;BA.debugLine="Dim t As Object = CallSub2(mCallback, mEventName";
_t = __c.CallSubNew2(ba,__ref._mcallback /*Object*/ ,__ref._meventname /*String*/ +"_HintRequested",(Object)(__ref._lastuserchangeindex /*int*/ ));
RDebugUtils.currentLine=21364742;
 //BA.debugLineNum = 21364742;BA.debugLine="If t <> Null Then";
if (_t!= null) { 
RDebugUtils.currentLine=21364743;
 //BA.debugLineNum = 21364743;BA.debugLine="InternalSetTextOrCSBuilderToLabel(lblHint, t)";
__ref._internalsettextorcsbuildertolabel /*String*/ (null,__ref._lblhint /*anywheresoftware.b4a.objects.B4XViewWrapper*/ ,_t);
 };
 };
RDebugUtils.currentLine=21364746;
 //BA.debugLineNum = 21364746;BA.debugLine="End Sub";
return "";
}
public String  _internalsettextorcsbuildertolabel(gunav2.keymon.com.mx.preoptimizedclv __ref,anywheresoftware.b4a.objects.B4XViewWrapper _xlbl,Object _text) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "internalsettextorcsbuildertolabel", true))
	 {return ((String) Debug.delegate(ba, "internalsettextorcsbuildertolabel", new Object[] {_xlbl,_text}));}
RDebugUtils.currentLine=21430272;
 //BA.debugLineNum = 21430272;BA.debugLine="Private Sub InternalSetTextOrCSBuilderToLabel(xlbl";
RDebugUtils.currentLine=21430274;
 //BA.debugLineNum = 21430274;BA.debugLine="xlbl.Text = Text";
_xlbl.setText(BA.ObjectToCharSequence(_text));
RDebugUtils.currentLine=21430284;
 //BA.debugLineNum = 21430284;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(gunav2.keymon.com.mx.preoptimizedclv __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
RDebugUtils.currentLine=20578304;
 //BA.debugLineNum = 20578304;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=20578305;
 //BA.debugLineNum = 20578305;BA.debugLine="Private mCLV As CustomListView";
_mclv = new b4a.example3.customlistview();
RDebugUtils.currentLine=20578306;
 //BA.debugLineNum = 20578306;BA.debugLine="Private items As List";
_items = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=20578307;
 //BA.debugLineNum = 20578307;BA.debugLine="Private PanelsCache As List";
_panelscache = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=20578308;
 //BA.debugLineNum = 20578308;BA.debugLine="Private StubPanel As B4XView";
_stubpanel = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=20578309;
 //BA.debugLineNum = 20578309;BA.debugLine="Private horizontal As Boolean";
_horizontal = false;
RDebugUtils.currentLine=20578310;
 //BA.debugLineNum = 20578310;BA.debugLine="Private AssignedItems() As B4XSet";
_assigneditems = new gunav2.keymon.com.mx.b4xset[(int) (0)];
{
int d0 = _assigneditems.length;
for (int i0 = 0;i0 < d0;i0++) {
_assigneditems[i0] = new gunav2.keymon.com.mx.b4xset();
}
}
;
RDebugUtils.currentLine=20578311;
 //BA.debugLineNum = 20578311;BA.debugLine="Private AssignedItemsAsIndex As Int";
_assigneditemsasindex = 0;
RDebugUtils.currentLine=20578315;
 //BA.debugLineNum = 20578315;BA.debugLine="Private jclv As JavaObject";
_jclv = new anywheresoftware.b4j.object.JavaObject();
RDebugUtils.currentLine=20578317;
 //BA.debugLineNum = 20578317;BA.debugLine="Public ExtraItems As Int = 3";
_extraitems = (int) (3);
RDebugUtils.currentLine=20578318;
 //BA.debugLineNum = 20578318;BA.debugLine="Private ListOfItemsThatShouldBeUpdated As List";
_listofitemsthatshouldbeupdated = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=20578319;
 //BA.debugLineNum = 20578319;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=20578320;
 //BA.debugLineNum = 20578320;BA.debugLine="Public ShowScrollBar As Boolean = True";
_showscrollbar = __c.True;
RDebugUtils.currentLine=20578321;
 //BA.debugLineNum = 20578321;BA.debugLine="Public B4XSeekBar1 As B4XSeekBar";
_b4xseekbar1 = new gunav2.keymon.com.mx.b4xseekbar();
RDebugUtils.currentLine=20578322;
 //BA.debugLineNum = 20578322;BA.debugLine="Public pnlOverlay As B4XView";
_pnloverlay = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=20578323;
 //BA.debugLineNum = 20578323;BA.debugLine="Public lblHint As B4XView";
_lblhint = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=20578324;
 //BA.debugLineNum = 20578324;BA.debugLine="Private LastUserChangeIndex As Int";
_lastuserchangeindex = 0;
RDebugUtils.currentLine=20578325;
 //BA.debugLineNum = 20578325;BA.debugLine="Public NumberOfSteps As Int = 20";
_numberofsteps = (int) (20);
RDebugUtils.currentLine=20578326;
 //BA.debugLineNum = 20578326;BA.debugLine="Public DelayBeforeHidingOverlay As Int = 50";
_delaybeforehidingoverlay = (int) (50);
RDebugUtils.currentLine=20578327;
 //BA.debugLineNum = 20578327;BA.debugLine="Private mCallback As Object";
_mcallback = new Object();
RDebugUtils.currentLine=20578328;
 //BA.debugLineNum = 20578328;BA.debugLine="Private mEventName As String";
_meventname = "";
RDebugUtils.currentLine=20578329;
 //BA.debugLineNum = 20578329;BA.debugLine="End Sub";
return "";
}
public String  _clearassigneditems(gunav2.keymon.com.mx.preoptimizedclv __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "clearassigneditems", true))
	 {return ((String) Debug.delegate(ba, "clearassigneditems", null));}
gunav2.keymon.com.mx.b4xset _s = null;
RDebugUtils.currentLine=21168128;
 //BA.debugLineNum = 21168128;BA.debugLine="Private Sub ClearAssignedItems";
RDebugUtils.currentLine=21168129;
 //BA.debugLineNum = 21168129;BA.debugLine="For Each s As B4XSet In AssignedItems";
{
final gunav2.keymon.com.mx.b4xset[] group1 = __ref._assigneditems /*gunav2.keymon.com.mx.b4xset[]*/ ;
final int groupLen1 = group1.length
;int index1 = 0;
;
for (; index1 < groupLen1;index1++){
_s = group1[index1];
RDebugUtils.currentLine=21168130;
 //BA.debugLineNum = 21168130;BA.debugLine="s.Clear";
_s._clear /*String*/ (null);
 }
};
RDebugUtils.currentLine=21168132;
 //BA.debugLineNum = 21168132;BA.debugLine="End Sub";
return "";
}
public String  _raisevisiblerangeevent(gunav2.keymon.com.mx.preoptimizedclv __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "raisevisiblerangeevent", true))
	 {return ((String) Debug.delegate(ba, "raisevisiblerangeevent", null));}
RDebugUtils.currentLine=20840448;
 //BA.debugLineNum = 20840448;BA.debugLine="Private Sub RaiseVisibleRangeEvent";
RDebugUtils.currentLine=20840449;
 //BA.debugLineNum = 20840449;BA.debugLine="jclv.RunMethod(\"_resetvisibles\", Null)";
__ref._jclv /*anywheresoftware.b4j.object.JavaObject*/ .RunMethod("_resetvisibles",(Object[])(__c.Null));
RDebugUtils.currentLine=20840450;
 //BA.debugLineNum = 20840450;BA.debugLine="jclv.RunMethod(\"_updatevisiblerange\", Null)";
__ref._jclv /*anywheresoftware.b4j.object.JavaObject*/ .RunMethod("_updatevisiblerange",(Object[])(__c.Null));
RDebugUtils.currentLine=20840451;
 //BA.debugLineNum = 20840451;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.B4XViewWrapper  _createpanel(gunav2.keymon.com.mx.preoptimizedclv __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "createpanel", true))
	 {return ((anywheresoftware.b4a.objects.B4XViewWrapper) Debug.delegate(ba, "createpanel", null));}
RDebugUtils.currentLine=20905984;
 //BA.debugLineNum = 20905984;BA.debugLine="Private Sub CreatePanel As B4XView";
RDebugUtils.currentLine=20905988;
 //BA.debugLineNum = 20905988;BA.debugLine="Return jclv.RunMethodJO(\"_createpanel\", Array(\"Pa";
if (true) return (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._jclv /*anywheresoftware.b4j.object.JavaObject*/ .RunMethodJO("_createpanel",new Object[]{(Object)("Panel")}).RunMethod("getObject",(Object[])(__c.Null))));
RDebugUtils.currentLine=20905990;
 //BA.debugLineNum = 20905990;BA.debugLine="End Sub";
return null;
}
public anywheresoftware.b4a.objects.B4XViewWrapper  _getpanel(gunav2.keymon.com.mx.preoptimizedclv __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "getpanel", true))
	 {return ((anywheresoftware.b4a.objects.B4XViewWrapper) Debug.delegate(ba, "getpanel", null));}
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
RDebugUtils.currentLine=21102592;
 //BA.debugLineNum = 21102592;BA.debugLine="Private Sub GetPanel As B4XView";
RDebugUtils.currentLine=21102593;
 //BA.debugLineNum = 21102593;BA.debugLine="If PanelsCache.Size = 0 Then Return CreatePanel";
if (__ref._panelscache /*anywheresoftware.b4a.objects.collections.List*/ .getSize()==0) { 
if (true) return __ref._createpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/ (null);};
RDebugUtils.currentLine=21102594;
 //BA.debugLineNum = 21102594;BA.debugLine="Dim p As B4XView = PanelsCache.Get(PanelsCache.Si";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._panelscache /*anywheresoftware.b4a.objects.collections.List*/ .Get((int) (__ref._panelscache /*anywheresoftware.b4a.objects.collections.List*/ .getSize()-1))));
RDebugUtils.currentLine=21102595;
 //BA.debugLineNum = 21102595;BA.debugLine="PanelsCache.RemoveAt(PanelsCache.Size - 1)";
__ref._panelscache /*anywheresoftware.b4a.objects.collections.List*/ .RemoveAt((int) (__ref._panelscache /*anywheresoftware.b4a.objects.collections.List*/ .getSize()-1));
RDebugUtils.currentLine=21102596;
 //BA.debugLineNum = 21102596;BA.debugLine="Return p";
if (true) return _p;
RDebugUtils.currentLine=21102597;
 //BA.debugLineNum = 21102597;BA.debugLine="End Sub";
return null;
}
public String  _handlescrollbar(gunav2.keymon.com.mx.preoptimizedclv __ref,int _firstvisible) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "handlescrollbar", true))
	 {return ((String) Debug.delegate(ba, "handlescrollbar", new Object[] {_firstvisible}));}
RDebugUtils.currentLine=21037056;
 //BA.debugLineNum = 21037056;BA.debugLine="Private Sub HandleScrollBar (FirstVisible As Int)";
RDebugUtils.currentLine=21037057;
 //BA.debugLineNum = 21037057;BA.debugLine="If ShowScrollBar = False Then Return";
if (__ref._showscrollbar /*boolean*/ ==__c.False) { 
if (true) return "";};
RDebugUtils.currentLine=21037058;
 //BA.debugLineNum = 21037058;BA.debugLine="B4XSeekBar1.Value = items.Size - FirstVisible";
__ref._b4xseekbar1 /*gunav2.keymon.com.mx.b4xseekbar*/ ._setvalue /*int*/ (null,(int) (__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .getSize()-_firstvisible));
RDebugUtils.currentLine=21037059;
 //BA.debugLineNum = 21037059;BA.debugLine="End Sub";
return "";
}
public void  _listchangedexternally(gunav2.keymon.com.mx.preoptimizedclv __ref) throws Exception{
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "listchangedexternally", true))
	 {Debug.delegate(ba, "listchangedexternally", null); return;}
ResumableSub_ListChangedExternally rsub = new ResumableSub_ListChangedExternally(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_ListChangedExternally extends BA.ResumableSub {
public ResumableSub_ListChangedExternally(gunav2.keymon.com.mx.preoptimizedclv parent,gunav2.keymon.com.mx.preoptimizedclv __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
gunav2.keymon.com.mx.preoptimizedclv __ref;
gunav2.keymon.com.mx.preoptimizedclv parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="preoptimizedclv";

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = -1;
RDebugUtils.currentLine=21233665;
 //BA.debugLineNum = 21233665;BA.debugLine="ClearAssignedItems";
__ref._clearassigneditems /*String*/ (null);
RDebugUtils.currentLine=21233666;
 //BA.debugLineNum = 21233666;BA.debugLine="Sleep(0)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "preoptimizedclv", "listchangedexternally"),(int) (0));
this.state = 1;
return;
case 1:
//C
this.state = -1;
;
RDebugUtils.currentLine=21233667;
 //BA.debugLineNum = 21233667;BA.debugLine="RaiseVisibleRangeEvent";
__ref._raisevisiblerangeevent /*String*/ (null);
RDebugUtils.currentLine=21233668;
 //BA.debugLineNum = 21233668;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public anywheresoftware.b4a.objects.collections.List  _visiblerangechanged(gunav2.keymon.com.mx.preoptimizedclv __ref,int _firstindex,int _lastindex) throws Exception{
__ref = this;
RDebugUtils.currentModule="preoptimizedclv";
if (Debug.shouldDelegate(ba, "visiblerangechanged", true))
	 {return ((anywheresoftware.b4a.objects.collections.List) Debug.delegate(ba, "visiblerangechanged", new Object[] {_firstindex,_lastindex}));}
int _fromindex = 0;
int _toindex = 0;
gunav2.keymon.com.mx.b4xset _prevset = null;
gunav2.keymon.com.mx.b4xset _nextset = null;
int _i = 0;
b4a.example3.customlistview._clvitem _it = null;
anywheresoftware.b4a.objects.B4XViewWrapper _pnl = null;
RDebugUtils.currentLine=20971520;
 //BA.debugLineNum = 20971520;BA.debugLine="Public Sub VisibleRangeChanged (FirstIndex As Int,";
RDebugUtils.currentLine=20971521;
 //BA.debugLineNum = 20971521;BA.debugLine="Dim FromIndex As Int = Max(0, FirstIndex - ExtraI";
_fromindex = (int) (__c.Max(0,_firstindex-__ref._extraitems /*int*/ ));
RDebugUtils.currentLine=20971522;
 //BA.debugLineNum = 20971522;BA.debugLine="Dim ToIndex As Int = Min(mCLV.Size - 1, LastIndex";
_toindex = (int) (__c.Min(__ref._mclv /*b4a.example3.customlistview*/ ._getsize()-1,_lastindex+__ref._extraitems /*int*/ ));
RDebugUtils.currentLine=20971523;
 //BA.debugLineNum = 20971523;BA.debugLine="Dim PrevSet As B4XSet = AssignedItems(AssignedIte";
_prevset = __ref._assigneditems /*gunav2.keymon.com.mx.b4xset[]*/ [__ref._assigneditemsasindex /*int*/ ];
RDebugUtils.currentLine=20971524;
 //BA.debugLineNum = 20971524;BA.debugLine="AssignedItemsAsIndex = (AssignedItemsAsIndex + 1)";
__ref._assigneditemsasindex /*int*/  = (int) ((__ref._assigneditemsasindex /*int*/ +1)%2);
RDebugUtils.currentLine=20971525;
 //BA.debugLineNum = 20971525;BA.debugLine="Dim NextSet As B4XSet = AssignedItems(AssignedIte";
_nextset = __ref._assigneditems /*gunav2.keymon.com.mx.b4xset[]*/ [__ref._assigneditemsasindex /*int*/ ];
RDebugUtils.currentLine=20971526;
 //BA.debugLineNum = 20971526;BA.debugLine="NextSet.Clear";
_nextset._clear /*String*/ (null);
RDebugUtils.currentLine=20971527;
 //BA.debugLineNum = 20971527;BA.debugLine="ListOfItemsThatShouldBeUpdated.Initialize";
__ref._listofitemsthatshouldbeupdated /*anywheresoftware.b4a.objects.collections.List*/ .Initialize();
RDebugUtils.currentLine=20971528;
 //BA.debugLineNum = 20971528;BA.debugLine="For i = FromIndex To ToIndex";
{
final int step8 = 1;
final int limit8 = _toindex;
_i = _fromindex ;
for (;_i <= limit8 ;_i = _i + step8 ) {
RDebugUtils.currentLine=20971529;
 //BA.debugLineNum = 20971529;BA.debugLine="Dim it As CLVItem = items.Get(i)";
_it = (b4a.example3.customlistview._clvitem)(__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .Get(_i));
RDebugUtils.currentLine=20971530;
 //BA.debugLineNum = 20971530;BA.debugLine="If it.Panel = StubPanel Then";
if ((_it.Panel).equals(__ref._stubpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/ )) { 
RDebugUtils.currentLine=20971531;
 //BA.debugLineNum = 20971531;BA.debugLine="it.Panel = GetPanel";
_it.Panel = __ref._getpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/ (null);
RDebugUtils.currentLine=20971532;
 //BA.debugLineNum = 20971532;BA.debugLine="it.Panel.Tag = i";
_it.Panel.setTag((Object)(_i));
RDebugUtils.currentLine=20971533;
 //BA.debugLineNum = 20971533;BA.debugLine="it.Panel.Color = it.Color";
_it.Panel.setColor(_it.Color);
RDebugUtils.currentLine=20971534;
 //BA.debugLineNum = 20971534;BA.debugLine="If horizontal Then";
if (__ref._horizontal /*boolean*/ ) { 
RDebugUtils.currentLine=20971535;
 //BA.debugLineNum = 20971535;BA.debugLine="mCLV.sv.ScrollViewInnerPanel.AddView(it.Panel,";
__ref._mclv /*b4a.example3.customlistview*/ ._sv.getScrollViewInnerPanel().AddView((android.view.View)(_it.Panel.getObject()),_it.Offset,(int) (0),_it.Size,__ref._mclv /*b4a.example3.customlistview*/ ._sv.getHeight());
 }else {
RDebugUtils.currentLine=20971537;
 //BA.debugLineNum = 20971537;BA.debugLine="mCLV.sv.ScrollViewInnerPanel.AddView(it.Panel,";
__ref._mclv /*b4a.example3.customlistview*/ ._sv.getScrollViewInnerPanel().AddView((android.view.View)(_it.Panel.getObject()),(int) (0),_it.Offset,__ref._mclv /*b4a.example3.customlistview*/ ._sv.getWidth(),_it.Size);
 };
RDebugUtils.currentLine=20971539;
 //BA.debugLineNum = 20971539;BA.debugLine="NextSet.Add(it.Panel)";
_nextset._add /*String*/ (null,(Object)(_it.Panel.getObject()));
RDebugUtils.currentLine=20971540;
 //BA.debugLineNum = 20971540;BA.debugLine="ListOfItemsThatShouldBeUpdated.Add(i)";
__ref._listofitemsthatshouldbeupdated /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_i));
 }else 
{RDebugUtils.currentLine=20971541;
 //BA.debugLineNum = 20971541;BA.debugLine="Else if PrevSet.Contains(it.Panel) Then";
if (_prevset._contains /*boolean*/ (null,(Object)(_it.Panel.getObject()))) { 
RDebugUtils.currentLine=20971542;
 //BA.debugLineNum = 20971542;BA.debugLine="NextSet.Add(it.Panel)";
_nextset._add /*String*/ (null,(Object)(_it.Panel.getObject()));
 }}
;
 }
};
RDebugUtils.currentLine=20971545;
 //BA.debugLineNum = 20971545;BA.debugLine="For Each pnl As B4XView In PrevSet.AsList";
_pnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
{
final anywheresoftware.b4a.BA.IterableList group25 = _prevset._aslist /*anywheresoftware.b4a.objects.collections.List*/ (null);
final int groupLen25 = group25.getSize()
;int index25 = 0;
;
for (; index25 < groupLen25;index25++){
_pnl = (anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(group25.Get(index25)));
RDebugUtils.currentLine=20971546;
 //BA.debugLineNum = 20971546;BA.debugLine="If NextSet.Contains(pnl) = False Then";
if (_nextset._contains /*boolean*/ (null,(Object)(_pnl.getObject()))==__c.False) { 
RDebugUtils.currentLine=20971547;
 //BA.debugLineNum = 20971547;BA.debugLine="If pnl.Parent.IsInitialized Then";
if (_pnl.getParent().IsInitialized()) { 
RDebugUtils.currentLine=20971548;
 //BA.debugLineNum = 20971548;BA.debugLine="pnl.RemoveViewFromParent";
_pnl.RemoveViewFromParent();
RDebugUtils.currentLine=20971549;
 //BA.debugLineNum = 20971549;BA.debugLine="pnl.GetView(0).RemoveAllViews";
_pnl.GetView((int) (0)).RemoveAllViews();
RDebugUtils.currentLine=20971550;
 //BA.debugLineNum = 20971550;BA.debugLine="pnl.RemoveAllViews";
_pnl.RemoveAllViews();
RDebugUtils.currentLine=20971551;
 //BA.debugLineNum = 20971551;BA.debugLine="PanelsCache.Add(pnl)";
__ref._panelscache /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_pnl.getObject()));
RDebugUtils.currentLine=20971552;
 //BA.debugLineNum = 20971552;BA.debugLine="Dim it As CLVItem = items.Get(pnl.Tag)";
_it = (b4a.example3.customlistview._clvitem)(__ref._items /*anywheresoftware.b4a.objects.collections.List*/ .Get((int)(BA.ObjectToNumber(_pnl.getTag()))));
RDebugUtils.currentLine=20971553;
 //BA.debugLineNum = 20971553;BA.debugLine="it.Panel = StubPanel";
_it.Panel = __ref._stubpanel /*anywheresoftware.b4a.objects.B4XViewWrapper*/ ;
 };
 };
 }
};
RDebugUtils.currentLine=20971557;
 //BA.debugLineNum = 20971557;BA.debugLine="HandleScrollBar (FirstIndex)";
__ref._handlescrollbar /*String*/ (null,_firstindex);
RDebugUtils.currentLine=20971558;
 //BA.debugLineNum = 20971558;BA.debugLine="Return ListOfItemsThatShouldBeUpdated";
if (true) return __ref._listofitemsthatshouldbeupdated /*anywheresoftware.b4a.objects.collections.List*/ ;
RDebugUtils.currentLine=20971559;
 //BA.debugLineNum = 20971559;BA.debugLine="End Sub";
return null;
}
}