package com.as.viewpager;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class b4xmainpage 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 BA(_ba, this, htSubs, "com.as.viewpager.b4xmainpage");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", com.as.viewpager.b4xmainpage.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public com.as.viewpager.asviewpager _asviewpager1 = null;
public com.as.viewpager.main _main = null;
public com.as.viewpager.starter _starter = null;
public com.as.viewpager.b4xpages _b4xpages = null;
public com.as.viewpager.b4xcollections _b4xcollections = null;
public String  _asviewpager1_pagechanged(int _index) throws Exception{
 //BA.debugLineNum = 31;BA.debugLine="Sub ASViewPager1_PageChanged (index As Int)";
 //BA.debugLineNum = 32;BA.debugLine="Log(\"PageChanged: \" & index)";
__c.LogImpl("7786433","PageChanged: "+BA.NumberToString(_index),0);
 //BA.debugLineNum = 33;BA.debugLine="B4XPages.SetTitle(Me,\"ASViewPager Example | Page";
_b4xpages._settitle /*String*/ (ba,this,(Object)("ASViewPager Example | Page "+BA.NumberToString((_index+1))+"/"+BA.NumberToString(_asviewpager1._getsize /*int*/ ())));
 //BA.debugLineNum = 34;BA.debugLine="End Sub";
return "";
}
public String  _asviewpager1_swipeonendofpage() throws Exception{
 //BA.debugLineNum = 36;BA.debugLine="Private Sub ASViewPager1_SwipeOnEndOfPage";
 //BA.debugLineNum = 37;BA.debugLine="Log(\"SwipeOnEndOfPage\")";
__c.LogImpl("7851969","SwipeOnEndOfPage",0);
 //BA.debugLineNum = 38;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
int _i = 0;
anywheresoftware.b4a.objects.B4XViewWrapper _tmp_xpnl = null;
 //BA.debugLineNum = 14;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 15;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 16;BA.debugLine="Root.LoadLayout(\"frm_main\")";
_root.LoadLayout("frm_main",ba);
 //BA.debugLineNum = 22;BA.debugLine="For i = 0 To 2";
{
final int step3 = 1;
final int limit3 = (int) (2);
_i = (int) (0) ;
for (;_i <= limit3 ;_i = _i + step3 ) {
 //BA.debugLineNum = 23;BA.debugLine="Dim tmp_xpnl As B4XView = xui.CreatePanel(\"\")";
_tmp_xpnl = new anywheresoftware.b4a.objects.B4XViewWrapper();
_tmp_xpnl = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 24;BA.debugLine="tmp_xpnl.Color = xui.Color_ARGB(255,Rnd(1,255),R";
_tmp_xpnl.setColor(_xui.Color_ARGB((int) (255),__c.Rnd((int) (1),(int) (255)),__c.Rnd((int) (1),(int) (255)),__c.Rnd((int) (1),(int) (255))));
 //BA.debugLineNum = 25;BA.debugLine="tmp_xpnl.SetLayoutAnimated(0,0,0,ASViewPager1.Ba";
_tmp_xpnl.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_asviewpager1._getbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ ().getWidth(),_asviewpager1._getbase /*anywheresoftware.b4a.objects.B4XViewWrapper*/ ().getHeight());
 //BA.debugLineNum = 26;BA.debugLine="ASViewPager1.AddPage(tmp_xpnl,\"\")";
_asviewpager1._addpage /*String*/ (_tmp_xpnl,(Object)(""));
 }
};
 //BA.debugLineNum = 28;BA.debugLine="B4XPages.SetTitle(Me,\"ASViewPager Example | Page";
_b4xpages._settitle /*String*/ (ba,this,(Object)("ASViewPager Example | Page "+BA.NumberToString(1)+"/"+BA.NumberToString(_asviewpager1._getsize /*int*/ ())));
 //BA.debugLineNum = 29;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 3;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 4;BA.debugLine="Private Root As B4XView";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 5;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 6;BA.debugLine="Private ASViewPager1 As ASViewPager";
_asviewpager1 = new com.as.viewpager.asviewpager();
 //BA.debugLineNum = 7;BA.debugLine="End Sub";
return "";
}
public String  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 9;BA.debugLine="Public Sub Initialize";
 //BA.debugLineNum = 11;BA.debugLine="End Sub";
return "";
}
public String  _xlbl_next_click() throws Exception{
 //BA.debugLineNum = 40;BA.debugLine="Private Sub xlbl_next_Click";
 //BA.debugLineNum = 41;BA.debugLine="ASViewPager1.NextPage";
_asviewpager1._nextpage /*String*/ ();
 //BA.debugLineNum = 42;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
	return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
