package shub.dpm;


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

public class menuhandler 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, "shub.dpm.menuhandler");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", shub.dpm.menuhandler.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.ActivityWrapper _aactivity = null;
public anywheresoftware.b4a.objects.PanelWrapper _pnl = null;
public anywheresoftware.b4a.objects.PanelWrapper _mnupnl = null;
public anywheresoftware.b4a.objects.PanelWrapper _pnlfooter = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _appimage = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _menuimage = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _backimage = null;
public anywheresoftware.b4a.objects.LabelWrapper _title = null;
public anywheresoftware.b4a.objects.LabelWrapper _footer = null;
public String _titletext = "";
public anywheresoftware.b4a.objects.collections.List _menulist = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lvmenu = null;
public int _barsize = 0;
public shub.dpm.main _main = null;
public shub.dpm.parameter _parameter = null;
public shub.dpm.about _about = null;
public shub.dpm.barcodescanner _barcodescanner = null;
public shub.dpm.allgfnkt _allgfnkt = null;
public shub.dpm.listdata _listdata = null;
public shub.dpm.starter _starter = null;
public shub.dpm.listpat _listpat = null;
public shub.dpm.b4xpages _b4xpages = null;
public shub.dpm.b4xcollections _b4xcollections = null;
public shub.dpm.httputils2service _httputils2service = null;
public String  _addmenu() throws Exception{
anywheresoftware.b4a.objects.drawable.ColorDrawable _c = null;
 //BA.debugLineNum = 74;BA.debugLine="Public Sub AddMenu";
 //BA.debugLineNum = 75;BA.debugLine="lvMenu.Initialize(\"lvmenu\")";
_lvmenu.Initialize(ba,"lvmenu");
 //BA.debugLineNum = 76;BA.debugLine="lvMenu.AddSingleLine(\"Einstellungen\")";
_lvmenu.AddSingleLine(BA.ObjectToCharSequence("Einstellungen"));
 //BA.debugLineNum = 77;BA.debugLine="lvMenu.AddSingleLine(\"Über...\")";
_lvmenu.AddSingleLine(BA.ObjectToCharSequence("Über..."));
 //BA.debugLineNum = 78;BA.debugLine="lvMenu.SingleLineLayout.Label.Textcolor=Colors.Bl";
_lvmenu.getSingleLineLayout().Label.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 79;BA.debugLine="menulist.Initialize()";
_menulist.Initialize();
 //BA.debugLineNum = 81;BA.debugLine="mnupnl.Initialize(\"\")";
_mnupnl.Initialize(ba,"");
 //BA.debugLineNum = 82;BA.debugLine="mnupnl.Width=60%x";
_mnupnl.setWidth(__c.PerXToCurrent((float) (60),ba));
 //BA.debugLineNum = 83;BA.debugLine="mnupnl.Height=lvMenu.Size*BarSize*2";
_mnupnl.setHeight((int) (_lvmenu.getSize()*_barsize*2));
 //BA.debugLineNum = 84;BA.debugLine="mnupnl.Color=Colors.LightGray";
_mnupnl.setColor(__c.Colors.LightGray);
 //BA.debugLineNum = 85;BA.debugLine="mnupnl.Top=BarSize+1";
_mnupnl.setTop((int) (_barsize+1));
 //BA.debugLineNum = 86;BA.debugLine="mnupnl.Left=100%x-mnupnl.Width";
_mnupnl.setLeft((int) (__c.PerXToCurrent((float) (100),ba)-_mnupnl.getWidth()));
 //BA.debugLineNum = 87;BA.debugLine="mnupnl.AddView(lvMenu,1,1,mnupnl.Width,mnupnl.Hei";
_mnupnl.AddView((android.view.View)(_lvmenu.getObject()),(int) (1),(int) (1),_mnupnl.getWidth(),_mnupnl.getHeight());
 //BA.debugLineNum = 88;BA.debugLine="Dim c As ColorDrawable";
_c = new anywheresoftware.b4a.objects.drawable.ColorDrawable();
 //BA.debugLineNum = 89;BA.debugLine="c.Initialize2(Colors.White,5dip,3dip,Colors.DarkG";
_c.Initialize2(__c.Colors.White,__c.DipToCurrent((int) (5)),__c.DipToCurrent((int) (3)),__c.Colors.DarkGray);
 //BA.debugLineNum = 90;BA.debugLine="mnupnl.Background = c";
_mnupnl.setBackground((android.graphics.drawable.Drawable)(_c.getObject()));
 //BA.debugLineNum = 91;BA.debugLine="mnupnl.Visible=False";
_mnupnl.setVisible(__c.False);
 //BA.debugLineNum = 92;BA.debugLine="AActivity.AddView(mnupnl,100%x-mnupnl.Width,BarSi";
_aactivity.AddView((android.view.View)(_mnupnl.getObject()),(int) (__c.PerXToCurrent((float) (100),ba)-_mnupnl.getWidth()),(int) (_barsize+1),_mnupnl.getWidth(),_mnupnl.getHeight());
 //BA.debugLineNum = 93;BA.debugLine="backimage.Visible=False";
_backimage.setVisible(__c.False);
 //BA.debugLineNum = 94;BA.debugLine="menuimage.Visible=True";
_menuimage.setVisible(__c.True);
 //BA.debugLineNum = 95;BA.debugLine="End Sub";
return "";
}
public String  _back_click() throws Exception{
 //BA.debugLineNum = 118;BA.debugLine="Public Sub Back_Click";
 //BA.debugLineNum = 119;BA.debugLine="AActivity.Finish";
_aactivity.Finish();
 //BA.debugLineNum = 120;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Dim AActivity As Activity";
_aactivity = new anywheresoftware.b4a.objects.ActivityWrapper();
 //BA.debugLineNum = 3;BA.debugLine="Dim pnl,mnupnl,pnlfooter As Panel";
_pnl = new anywheresoftware.b4a.objects.PanelWrapper();
_mnupnl = new anywheresoftware.b4a.objects.PanelWrapper();
_pnlfooter = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 4;BA.debugLine="Dim appimage, menuimage, backimage As ImageView";
_appimage = new anywheresoftware.b4a.objects.ImageViewWrapper();
_menuimage = new anywheresoftware.b4a.objects.ImageViewWrapper();
_backimage = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 6;BA.debugLine="Dim Title, footer As Label";
_title = new anywheresoftware.b4a.objects.LabelWrapper();
_footer = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 7;BA.debugLine="Dim Titletext As String";
_titletext = "";
 //BA.debugLineNum = 8;BA.debugLine="Dim menulist As List";
_menulist = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 10;BA.debugLine="Public lvMenu As ListView";
_lvmenu = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 11;BA.debugLine="Dim BarSize As Int=5%y";
_barsize = __c.PerYToCurrent((float) (5),ba);
 //BA.debugLineNum = 14;BA.debugLine="End Sub";
return "";
}
public String  _hidemenu() throws Exception{
 //BA.debugLineNum = 113;BA.debugLine="Public Sub HideMenu";
 //BA.debugLineNum = 114;BA.debugLine="menuimage.Visible=False";
_menuimage.setVisible(__c.False);
 //BA.debugLineNum = 115;BA.debugLine="backimage.Visible=True";
_backimage.setVisible(__c.True);
 //BA.debugLineNum = 116;BA.debugLine="End Sub";
return "";
}
public String  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
anywheresoftware.b4a.objects.drawable.ColorDrawable _pc = null;
 //BA.debugLineNum = 24;BA.debugLine="Public Sub Initialize";
 //BA.debugLineNum = 26;BA.debugLine="appimage.Initialize(\"\")";
_appimage.Initialize(ba,"");
 //BA.debugLineNum = 27;BA.debugLine="menuimage.Initialize(\"menu\")";
_menuimage.Initialize(ba,"menu");
 //BA.debugLineNum = 28;BA.debugLine="backimage.Initialize(\"back\")";
_backimage.Initialize(ba,"back");
 //BA.debugLineNum = 29;BA.debugLine="menuimage.Visible=False";
_menuimage.setVisible(__c.False);
 //BA.debugLineNum = 30;BA.debugLine="backimage.Visible=False";
_backimage.setVisible(__c.False);
 //BA.debugLineNum = 31;BA.debugLine="pnl.Initialize(\"\")";
_pnl.Initialize(ba,"");
 //BA.debugLineNum = 32;BA.debugLine="pnl.Top=0";
_pnl.setTop((int) (0));
 //BA.debugLineNum = 33;BA.debugLine="pnl.Left=0";
_pnl.setLeft((int) (0));
 //BA.debugLineNum = 34;BA.debugLine="pnl.Width=100%x";
_pnl.setWidth(__c.PerXToCurrent((float) (100),ba));
 //BA.debugLineNum = 35;BA.debugLine="pnl.Height=BarSize+2";
_pnl.setHeight((int) (_barsize+2));
 //BA.debugLineNum = 36;BA.debugLine="pnl.Color=Colors.DarkGray";
_pnl.setColor(__c.Colors.DarkGray);
 //BA.debugLineNum = 37;BA.debugLine="appimage.Bitmap=LoadBitmapResize(File.DirAssets,\"";
_appimage.setBitmap((android.graphics.Bitmap)(__c.LoadBitmapResize(__c.File.getDirAssets(),"icon.png",_barsize,_barsize,__c.True).getObject()));
 //BA.debugLineNum = 40;BA.debugLine="Title.Initialize(\"\")";
_title.Initialize(ba,"");
 //BA.debugLineNum = 41;BA.debugLine="Title.Text=Titletext";
_title.setText(BA.ObjectToCharSequence(_titletext));
 //BA.debugLineNum = 42;BA.debugLine="Title.TextColor=Colors.White";
_title.setTextColor(__c.Colors.White);
 //BA.debugLineNum = 43;BA.debugLine="Title.TextSize=20";
_title.setTextSize((float) (20));
 //BA.debugLineNum = 45;BA.debugLine="menuimage.Bitmap=LoadBitmapResize(File.DirAssets,";
_menuimage.setBitmap((android.graphics.Bitmap)(__c.LoadBitmapResize(__c.File.getDirAssets(),"menuicon.png",_barsize,_barsize,__c.True).getObject()));
 //BA.debugLineNum = 46;BA.debugLine="backimage.Bitmap=LoadBitmapResize(File.DirAssets,";
_backimage.setBitmap((android.graphics.Bitmap)(__c.LoadBitmapResize(__c.File.getDirAssets(),"arrowback.png",_barsize,_barsize,__c.True).getObject()));
 //BA.debugLineNum = 47;BA.debugLine="Dim pc As ColorDrawable";
_pc = new anywheresoftware.b4a.objects.drawable.ColorDrawable();
 //BA.debugLineNum = 48;BA.debugLine="pc.Initialize2(0xFF077AFF,1,1,0xFF077AFF)";
_pc.Initialize2((int) (0xff077aff),(int) (1),(int) (1),(int) (0xff077aff));
 //BA.debugLineNum = 49;BA.debugLine="pnl.Background=pc";
_pnl.setBackground((android.graphics.drawable.Drawable)(_pc.getObject()));
 //BA.debugLineNum = 50;BA.debugLine="pnl.AddView(appimage,0,0,BarSize,BarSize)";
_pnl.AddView((android.view.View)(_appimage.getObject()),(int) (0),(int) (0),_barsize,_barsize);
 //BA.debugLineNum = 51;BA.debugLine="pnl.AddView(menuimage,100%x-BarSize,1,BarSize,Bar";
_pnl.AddView((android.view.View)(_menuimage.getObject()),(int) (__c.PerXToCurrent((float) (100),ba)-_barsize),(int) (1),_barsize,_barsize);
 //BA.debugLineNum = 52;BA.debugLine="pnl.AddView(backimage,100%x-BarSize,1,BarSize,Bar";
_pnl.AddView((android.view.View)(_backimage.getObject()),(int) (__c.PerXToCurrent((float) (100),ba)-_barsize),(int) (1),_barsize,_barsize);
 //BA.debugLineNum = 54;BA.debugLine="pnl.AddView(Title,appimage.Width+2%X,appimage.Top";
_pnl.AddView((android.view.View)(_title.getObject()),(int) (_appimage.getWidth()+__c.PerXToCurrent((float) (2),ba)),(int) (_appimage.getTop()+2),__c.PerXToCurrent((float) (60),ba),_barsize);
 //BA.debugLineNum = 56;BA.debugLine="pnlfooter.Initialize(\"\")";
_pnlfooter.Initialize(ba,"");
 //BA.debugLineNum = 57;BA.debugLine="footer.Initialize(\"\")";
_footer.Initialize(ba,"");
 //BA.debugLineNum = 59;BA.debugLine="pnlfooter.Height=BarSize/3";
_pnlfooter.setHeight((int) (_barsize/(double)3));
 //BA.debugLineNum = 60;BA.debugLine="pnlfooter.Background=pc";
_pnlfooter.setBackground((android.graphics.drawable.Drawable)(_pc.getObject()));
 //BA.debugLineNum = 61;BA.debugLine="footer.Text=Chr(0x00A9)& \"2021 - Stefan Hutter Un";
_footer.setText(BA.ObjectToCharSequence(BA.ObjectToString(__c.Chr((int) (0x00a9)))+"2021 - Stefan Hutter Unternehmensberatung"));
 //BA.debugLineNum = 62;BA.debugLine="footer.Gravity=Gravity.CENTER";
_footer.setGravity(__c.Gravity.CENTER);
 //BA.debugLineNum = 63;BA.debugLine="footer.Width=100%x";
_footer.setWidth(__c.PerXToCurrent((float) (100),ba));
 //BA.debugLineNum = 64;BA.debugLine="pnlfooter.AddView(footer,1,1,pnlfooter.Width,pnlf";
_pnlfooter.AddView((android.view.View)(_footer.getObject()),(int) (1),(int) (1),_pnlfooter.getWidth(),_pnlfooter.getHeight());
 //BA.debugLineNum = 67;BA.debugLine="End Sub";
return "";
}
public String  _initialize2() throws Exception{
 //BA.debugLineNum = 69;BA.debugLine="public Sub Initialize2";
 //BA.debugLineNum = 70;BA.debugLine="AActivity.AddView(pnl,0,0,pnl.Width,BarSize)";
_aactivity.AddView((android.view.View)(_pnl.getObject()),(int) (0),(int) (0),_pnl.getWidth(),_barsize);
 //BA.debugLineNum = 71;BA.debugLine="AActivity.AddView(pnlfooter,0,100%y-pnlfooter.Hei";
_aactivity.AddView((android.view.View)(_pnlfooter.getObject()),(int) (0),(int) (__c.PerYToCurrent((float) (100),ba)-_pnlfooter.getHeight()),__c.PerXToCurrent((float) (100),ba),_pnlfooter.getHeight());
 //BA.debugLineNum = 72;BA.debugLine="End Sub";
return "";
}
public String  _lvmenu_itemclick(int _position,Object _value) throws Exception{
 //BA.debugLineNum = 102;BA.debugLine="Private Sub lvmenu_ItemClick (Position As Int, Val";
 //BA.debugLineNum = 103;BA.debugLine="If Value=\"Einstellungen\" Then StartActivity(\"Para";
if ((_value).equals((Object)("Einstellungen"))) { 
__c.StartActivity(ba,(Object)("Parameter"));};
 //BA.debugLineNum = 104;BA.debugLine="If Value=\"Über...\" Then StartActivity(\"About\")";
if ((_value).equals((Object)("Über..."))) { 
__c.StartActivity(ba,(Object)("About"));};
 //BA.debugLineNum = 106;BA.debugLine="mnupnl.Visible=False";
_mnupnl.setVisible(__c.False);
 //BA.debugLineNum = 107;BA.debugLine="End Sub";
return "";
}
public String  _menu_click() throws Exception{
 //BA.debugLineNum = 97;BA.debugLine="Sub menu_click";
 //BA.debugLineNum = 98;BA.debugLine="If mnupnl.Visible=False Then mnupnl.Visible=True";
if (_mnupnl.getVisible()==__c.False) { 
_mnupnl.setVisible(__c.True);}
else {
_mnupnl.setVisible(__c.False);};
 //BA.debugLineNum = 99;BA.debugLine="End Sub";
return "";
}
public String  _setpanel() throws Exception{
 //BA.debugLineNum = 17;BA.debugLine="public Sub setpanel";
 //BA.debugLineNum = 18;BA.debugLine="pnl.Top=0";
_pnl.setTop((int) (0));
 //BA.debugLineNum = 19;BA.debugLine="pnl.Left=0";
_pnl.setLeft((int) (0));
 //BA.debugLineNum = 20;BA.debugLine="pnl.Width=100%x";
_pnl.setWidth(__c.PerXToCurrent((float) (100),ba));
 //BA.debugLineNum = 21;BA.debugLine="pnl.Height=BarSize+2";
_pnl.setHeight((int) (_barsize+2));
 //BA.debugLineNum = 23;BA.debugLine="End Sub";
return "";
}
public String  _settitle() throws Exception{
 //BA.debugLineNum = 109;BA.debugLine="Public Sub SetTitle";
 //BA.debugLineNum = 110;BA.debugLine="Title.Text=Titletext";
_title.setText(BA.ObjectToCharSequence(_titletext));
 //BA.debugLineNum = 111;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}
