Android Question having trouble with AHNavigationDrawer

M.Amini

Member
Hi everyone. i have a trouble with AHNavigationDrawer. I made a menu using AHNavigationDrawer. first of all i need to open menu from right to left but it open from left. the second problem is i have four button in bottom of page. when menu open these buttons are on top of the menu while they must be under the menu.
menu using AHNavigationDrawer:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private pnl_title As Panel
    Private img_menu As ImageView
    Private img_pic_main As ImageView
    Private lbl_name As Label
    Private lbl_version As Label
    Private pnl_list As Panel
    Private btn_fav As Button
    Private btn_score As Button
    Private btn_setting As Button
    Private btn_info As Button
    Private lbl_title As Label
    Private lbl_list As Label
    Private img_banner As ImageView
    Private lst_items As ListView
    Dim Nav As AHNavigationDrawer
    Dim p_menu As Panel
   
End Sub

Public Sub Initialize
'    B4XPages.GetManager.LogEvents = True
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    'Root.SetBitmap(LoadBitmap(File.DirAssets,"download.jpg"))
    img_banner.Initialize("")
    lst_items.Initialize("")
   
    p_menu.Initialize("")
    Root.AddView(p_menu,0%x,0%y,100%x,100%y)
   
    Nav.Initialize("menu",p_menu,80%x)
    Nav.ContentPanel.LoadLayout("MainPage")
    Nav.NavigationPanel.LoadLayout("menu")
    Nav.SetEdgeSize(Nav.GRAVITY_LEFT,100dip)
   
   
    lbl_title.Text="شرایط عمومی پیمان"
    lbl_title.TextColor=Colors.White
    lbl_title.Gravity=Gravity.RIGHT
    lbl_title.Typeface = Typeface.LoadFromAssets("BZarBd.ttf")
    lbl_title.TextSize=18
    lbl_title.Typeface=Typeface.DEFAULT_BOLD
    'lbl_title.Color = Colors.RGB(255,23,68)
   
    img_banner.SetBackgroundImage(LoadBitmap(File.DirAssets,"Untitled.png"))
   
    img_menu.SetBackgroundImage(LoadBitmap(File.DirAssets,"menu-icon-8.png"))
   
    img_pic_main.SetBackgroundImage(LoadBitmap(File.DirAssets,"nashrie4311-2.jpg"))
    pnl_title.Color = Colors.RGB(255,23,68)
   
    lbl_name.Text="شرایط عمومی پیمان و پرسش و پاسخ"
    lbl_name.TextColor=Colors.Black
    lbl_name.TextSize=20
    lbl_name.Gravity=Gravity.CENTER
    lbl_name.Typeface=Typeface.LoadFromAssets("BZarBd.ttf")
   
    lbl_version.Text="نسخه 1.0"
    lbl_version.TextColor=Colors.Black
    lbl_version.TextSize=16
    lbl_version.Gravity = Gravity.CENTER
    lbl_version.Typeface=Typeface.LoadFromAssets("BZarBd.ttf")
   
    'pnl_list.Color=Colors.RGB(255,193,7)
   
    lbl_list.Text="لیست آموزش‌ها"
    lbl_list.TextColor=Colors.Black
    lbl_list.TextSize=14
    lbl_list.Gravity = Gravity.CENTER
    lbl_list.Typeface=Typeface.LoadFromAssets("BZarBd.ttf")
   
   
   
    lst_items.AddTwoLinesAndBitmap("صفحه اصلی","",LoadBitmap(File.DirAssets,"home2.png"))
    lst_items.AddTwoLinesAndBitmap("فهرست مطالب","",Null)
    lst_items.AddTwoLinesAndBitmap("علاقه مندی ها","",Null)
    lst_items.AddTwoLinesAndBitmap("جستجو","",Null)
    lst_items.AddTwoLinesAndBitmap("تنظیمات","",Null)
    lst_items.AddTwoLinesAndBitmap("درباره ما","",Null)
   
    lst_items.TwoLinesAndBitmap.Label.Color=Colors.Black
    lst_items.TwoLinesAndBitmap.Label.Typeface=Typeface.LoadFromAssets("BZarBd.ttf")
    lst_items.TwoLinesAndBitmap.Label.TextSize =15
    lst_items.TwoLinesAndBitmap.ItemHeight=8%y
    lst_items.TwoLinesAndBitmap.Label.Gravity=Gravity.CENTER
    lst_items.Color = Colors.RGB(224,224,224)
   
    btn_fav.SetBackgroundImage(LoadBitmap(File.DirAssets,"fav.png"))
    btn_info.SetBackgroundImage(LoadBitmap(File.DirAssets,"info.png"))
    btn_score.SetBackgroundImage(LoadBitmap(File.DirAssets,"scor.jpg"))
    btn_setting.SetBackgroundImage(LoadBitmap(File.DirAssets,"setting.jpg"))
   
End Sub

'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.



Private Sub btn_info_Click
   
End Sub

Private Sub btn_setting_Click
   
End Sub

Private Sub btn_score_Click
   
End Sub

Private Sub btn_fav_Click
   
End Sub

Private Sub img_menu_Click
    Nav.OpenDrawer2(Nav.GRAVITY_START)
End Sub

Private Sub lst_items_ItemClick (Position As Int, Value As Object)
   
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…